Use access_token with openid-client to fix facebook (#9598)

This commit is contained in:
Aiden Foxx
2021-11-10 16:46:44 +01:00
committed by GitHub
parent cbe87299c7
commit 175dc20a1d
2 changed files with 2 additions and 2 deletions

View File

@@ -96,7 +96,7 @@ export class OAuth2AuthDriver extends LocalAuthDriver {
const issuer = this.client.issuer;
if (issuer.metadata.userinfo_endpoint) {
userInfo = await this.client.userinfo(tokenSet);
userInfo = await this.client.userinfo(tokenSet.access_token!);
} else if (tokenSet.id_token) {
userInfo = tokenSet.claims();
} else {

View File

@@ -98,7 +98,7 @@ export class OpenIDAuthDriver extends LocalAuthDriver {
const issuer = client.issuer;
if (issuer.metadata.userinfo_endpoint) {
userInfo = await client.userinfo(tokenSet);
userInfo = await client.userinfo(tokenSet.access_token!);
} else {
userInfo = tokenSet.claims();
}