Address review comments

Signed-off-by: Olivier Liechti <olivier.liechti@wasabi-tech.com>
This commit is contained in:
Olivier Liechti
2024-07-10 08:11:02 +02:00
parent 9076843ffd
commit aca86a6a00
3 changed files with 5 additions and 12 deletions
-5
View File
@@ -1,5 +0,0 @@
---
'@backstage/plugin-auth-backend': patch
---
Use new Atlassian Passport profile in type definition
+1 -2
View File
@@ -1,6 +1,5 @@
---
'@backstage/plugin-auth-backend-module-atlassian-provider': patch
'@backstage/plugin-auth-node': patch
---
Fix issues with Atlassian OAuth provider
Fix issues with Atlassian OAuth provider: retrieve the email and photo that were not in arrays but rather in single props.
@@ -40,10 +40,8 @@ export class PassportHelpers {
if (profile.emails && profile.emails.length > 0) {
const [firstEmail] = profile.emails;
email = firstEmail.value;
}
// This is the case for Atlassian
if (profile.email) {
} else if (profile.email) {
// This is the case for Atlassian
email = profile.email;
}
@@ -54,7 +52,8 @@ export class PassportHelpers {
const [firstPhoto] = profile.photos;
picture = firstPhoto.value;
} else if (profile.photo) {
picture = profile.photo; // This is the case for Atlassian
// This is the case for Atlassian
picture = profile.photo;
}
let displayName: string | undefined =