Skip to content

Commit 49cff6a

Browse files
authored
Merge pull request #23077 from afscrome/fixmsauthwithnoprofile
Fix Microsoft Auth Provider when Profile not requested
2 parents 707b25e + e1eaac4 commit 49cff6a

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changeset/eight-oranges-wave.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@backstage/plugin-auth-node': patch
3+
---
4+
5+
Fix error when Microsoft tokens (or any other using the `defaultProfileTransform`) are requested without the profile scope.

plugins/auth-node/src/oauth/PassportOAuthAuthenticatorHelper.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export class PassportOAuthAuthenticatorHelper {
5757
OAuthAuthenticatorResult<PassportProfile>
5858
> = async input => ({
5959
profile: PassportHelpers.transformProfile(
60-
input.fullProfile,
60+
input.fullProfile ?? {},
6161
input.session.idToken,
6262
),
6363
});

0 commit comments

Comments
 (0)