Return access_token with profile

This commit is contained in:
Ben Barbersmith 2021-06-02 12:01:29 +01:00
parent ec0ad24b39
commit 6c2ededcdb

View File

@ -87,6 +87,7 @@ export class OAuth2Provider<
const res = await fetch(this.config.profileUrl!, { const res = await fetch(this.config.profileUrl!, {
headers: { Authorization: `${ucFirst(tokens.token_type)} ${tokens.access_token}` }, headers: { Authorization: `${ucFirst(tokens.token_type)} ${tokens.access_token}` },
}); });
return await res.json(); const profile = await res.json();
return { ...profile, access_token: tokens.access_token };
} }
} }