Download src/config/oauthStrategies/githubLogin.ts from lynfera/api: direct link, hf CLI and curl.
- Browser
- Download file 560 Bytes
-
https://huggingface.co/spaces/lynfera/api/resolve/main/src/config/oauthStrategies/githubLogin.ts
- Command line
-
hf download hf://spaces/lynfera/api/src/config/oauthStrategies/githubLogin.ts
-
curl -L -o githubLogin.ts https://huggingface.co/spaces/lynfera/api/resolve/main/src/config/oauthStrategies/githubLogin.ts
560 Bytes
| import { PassportStatic } from "passport"; | |
| import { Strategy as GithubStategy } from "passport-github2"; | |
| import { githubLoginStrategy } from "../../controllers/authController.js"; | |
| import { ENVS } from "@/config/env.config.js"; | |
| const githubLogin = (passport: PassportStatic) => { | |
| passport.use( | |
| new GithubStategy( | |
| { | |
| clientID: ENVS.GITHUB_CLIENT_ID as string, | |
| clientSecret: ENVS.GITHUB_CLIENT_SECRET as string, | |
| callbackURL: `${ENVS.API_ENDPOINT}/api/auth/github/callback`, | |
| }, | |
| githubLoginStrategy, | |
| ), | |
| ); | |
| }; | |
| export default githubLogin; | |