Merge pull request #23077 from afscrome/fixmsauthwithnoprofile

Fix Microsoft Auth Provider when Profile not requested
This commit is contained in:
Patrik Oldsberg
2024-02-19 20:27:14 +01:00
committed by GitHub
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -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.
@@ -57,7 +57,7 @@ export class PassportOAuthAuthenticatorHelper {
OAuthAuthenticatorResult<PassportProfile>
> = async input => ({
profile: PassportHelpers.transformProfile(
input.fullProfile,
input.fullProfile ?? {},
input.session.idToken,
),
});