Cleaning up details

Signed-off-by: Olivier Liechti <olivier.liechti@wasabi-tech.com>
This commit is contained in:
Olivier Liechti
2024-07-09 10:20:17 +02:00
parent b9832aee3d
commit be5f08f3a8
2 changed files with 1 additions and 10 deletions
@@ -29,9 +29,6 @@ describe('Strategy', () => {
},
() => {},
);
console.log(strategy.name);
expect(strategy).toBeInstanceOf(Strategy);
expect((strategy as any).name).toBe('atlassian');
} catch (e) {
console.error(e);
@@ -70,7 +70,6 @@ export const atlassianAuthenticator = createOAuthAuthenticator<
baseURL: baseUrl,
authorizationURL: `${baseUrl}/authorize`,
tokenURL: `${baseUrl}/oauth/token`,
// profileURL: `${baseUrl}/api/v4/user`,
profileURL: 'https://api.atlassian.com/me',
scope: config.getOptionalString('additionalScopes')?.split(' ') || [],
},
@@ -81,14 +80,9 @@ export const atlassianAuthenticator = createOAuthAuthenticator<
fullProfile: PassportProfile & { email: string; photo: string },
done: PassportOAuthDoneCallback,
) => {
const fullProfileWithEmails = {
...fullProfile,
// avatarUrl: fullProfile.photo,
// emails: [{ value: fullProfile.email }],
};
done(
undefined,
{ fullProfile: fullProfileWithEmails, params, accessToken },
{ fullProfile, params, accessToken },
{ refreshToken },
);
},