Skip to content

Commit

Permalink
Merge pull request #23077 from afscrome/fixmsauthwithnoprofile
Browse files Browse the repository at this point in the history
Fix Microsoft Auth Provider when Profile not requested
  • Loading branch information
Rugvip authored Feb 19, 2024
2 parents 707b25e + e1eaac4 commit 49cff6a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/eight-oranges-wave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@backstage/plugin-auth-node': patch
---

Fix error when Microsoft tokens (or any other using the `defaultProfileTransform`) are requested without the profile scope.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class PassportOAuthAuthenticatorHelper {
OAuthAuthenticatorResult<PassportProfile>
> = async input => ({
profile: PassportHelpers.transformProfile(
input.fullProfile,
input.fullProfile ?? {},
input.session.idToken,
),
});
Expand Down

0 comments on commit 49cff6a

Please sign in to comment.