1.0.0 • Published 3 years ago
@md03/passport-google v1.0.0
Google strategy for Passport.js
Easy to use Google strategy. It's just Sign In With Google implementation (https://developers.google.com/identity/gsi/web/guides/verify-google-id-token).
Installation
# pnpm:
pnpm add @md03/passport-google
# npm:
npm install @md03/passport-google
# yarn:
yarn add @md03/passport-googleOptions
clientId(required) - required for idToken verification.csrfCheck(optional) - strategy will validateg_csrf_token. False by default.passReqToCallback(optional) - strategy will pass Request object to callback.tokenFromRequest(optional) - strategy will use provided function to extract id token from request.
// example:
function getIdToken(req: Request) {
return req.query.idToken;
}Important things
- Use HTTPS
- Never include your secrets directly in your code base - use environment variables instead.
1.0.0
3 years ago