Skip to content

Commit

Permalink
fix: fallback to randomUUID if provider doesn't return a user.id
Browse files Browse the repository at this point in the history
  • Loading branch information
ndom91 committed Feb 7, 2024
1 parent 88cb71c commit 6ede795
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/lib/actions/callback/oauth/callback.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ export async function getUserAndAccount(
...tokens,
provider: provider.id,
type: provider.type,
providerAccountId: userFromProfile.id?.toString()!,
providerAccountId: userFromProfile.id ?? crypto.randomUUID(),
},
}
} catch (e) {
Expand Down

0 comments on commit 6ede795

Please sign in to comment.