plugins/auth-backend: forward id token to auth session

This commit is contained in:
Patrik Oldsberg
2020-05-22 12:30:02 +02:00
parent 786a00d6d0
commit 73c555f41d
@@ -70,15 +70,20 @@ export class GoogleAuthProvider
strategy(): passport.Strategy {
return new GoogleStrategy(
{ ...this.providerConfig.options, passReqToCallback: true },
{ ...this.providerConfig.options },
(
_req: any,
accessToken: any,
refreshToken: any,
params: any,
profile: any,
cb: any,
) => {
cb(undefined, { profile, accessToken, refreshToken });
cb(undefined, {
profile,
idToken: params.id_token,
accessToken,
refreshToken,
});
},
);
}