From 6c2ededcdb68cf0f07dd2cf68a13fadfdffdf67f Mon Sep 17 00:00:00 2001 From: Ben Barbersmith Date: Wed, 2 Jun 2021 12:01:29 +0100 Subject: [PATCH] Return access_token with profile --- src/providers/oauth2.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/providers/oauth2.ts b/src/providers/oauth2.ts index 391fb63..80bc6ae 100644 --- a/src/providers/oauth2.ts +++ b/src/providers/oauth2.ts @@ -87,6 +87,7 @@ export class OAuth2Provider< const res = await fetch(this.config.profileUrl!, { 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 }; } }