create oauth login

Create authentication with oAuth using a third-party vendor. Currently, only GitHub is available, but more will be added
in the future.
This commit is contained in:
2025-08-05 17:11:36 +07:00
parent 88257d0eee
commit 419b5b0ae4
10 changed files with 132 additions and 4 deletions

View File

@ -0,0 +1,10 @@
import { GitHub } from "arctic";
export const githubProvider = () => {
const redirectURI = `${process.env.APP_PROTOCOL}://${process.env.APP_DOMAIN}${process.env.GITHUB_CLIENT_CALLBACK}`;
return new GitHub(
process.env.GITHUB_CLIENT_ID!,
process.env.GITHUB_CLIENT_SECRET!,
redirectURI
);
};