diff --git a/plugins/auth-backend/src/providers/github/provider.ts b/plugins/auth-backend/src/providers/github/provider.ts index a550cd1fdc..62f2534601 100644 --- a/plugins/auth-backend/src/providers/github/provider.ts +++ b/plugins/auth-backend/src/providers/github/provider.ts @@ -79,7 +79,7 @@ export class GithubAuthProvider implements OAuthHandlers { const profile = makeProfileInfo( { ...fullProfile, - id: fullProfile.id, + id: fullProfile.username || fullProfile.id, displayName: fullProfile.displayName || fullProfile.username || fullProfile.id, }, @@ -95,7 +95,7 @@ export class GithubAuthProvider implements OAuthHandlers { expiresInSeconds: params.expires_in, }, backstageIdentity: { - id: fullProfile.id, + id: fullProfile.username || fullProfile.id, }, }, };