hapi-google-id-token
Authenticate using a Google ID Token
See Google Identity Platform docs for information on obtaining a Google ID Token.
Documentation
clientId
- (required) Your application's Google apps clientId.validateToken
- (optional) the function which is run once the Token has been decoded and verified against Google public keys. signaturefunction(decoded, request, callback)
where:decoded
- (required) is the decoded and verified JWT received from the client in request.headers.authorizationrequest
- (required) is the original request received from the clientcallback
- (required) a callback function with the signaturefunction(err, credentials)
where:err
- an internal error.credentials
- (optional) alternative credentials to be set instead ofdecoded
.
urlKey
- (optional) Used to override the query parameter that can be used to accept the token. Defaults toid_token
. May be set tofalse
to disable query parameter checks.cookieKey
- (optional) Used to override the cookie key that can be used to accept the token. Defaults toid_token
. May be set tofalse
to disable cookie checks.headerKey
- (optional) Used to override the header that can be used to accept the token. Defaults toauthorization
, because it's standard and cors friendly.