✨ 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:
10
src/modules/auth/providers/github.provider.ts
Normal file
10
src/modules/auth/providers/github.provider.ts
Normal 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
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user