Skip to content

Commit

Permalink
💥 Fix avatar name & username mixup
Browse files Browse the repository at this point in the history
  • Loading branch information
coyotte508 committed Nov 26, 2024
1 parent 06fb210 commit 45ce7c1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/hub/src/lib/oauth-handle-redirect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ export async function oauthHandleRedirect(opts?: { hubUrl?: string }): Promise<O
sub: string;
name: string;
picture: string;
preferred_username: string;
isEnterprise: boolean;
canPay?: boolean;
roleInOrg?: string;
Expand All @@ -172,8 +173,8 @@ export async function oauthHandleRedirect(opts?: { hubUrl?: string }): Promise<O
accessTokenExpiresAt,
userInfo: {
id: userInfo.sub,
name: userInfo.name,
fullname: userInfo.preferred_username,
name: userInfo.preferred_username,
fullname: userInfo.name,
email: userInfo.email,
emailVerified: userInfo.email_verified,
avatarUrl: userInfo.picture,
Expand All @@ -182,7 +183,7 @@ export async function oauthHandleRedirect(opts?: { hubUrl?: string }): Promise<O
orgs:
userInfo.orgs?.map((org) => ({
id: org.sub,
name: org.name,
name: org.preferred_username,
fullname: org.name,
isEnterprise: org.isEnterprise,
canPay: org.canPay,
Expand Down

0 comments on commit 45ce7c1

Please sign in to comment.