Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge branch 'main' into chore/improve-errors
  • Loading branch information
balazsorban44 committed May 1, 2023
commit b60f385161c6d99122827dd7b605525f49b2ff42
5 changes: 5 additions & 0 deletions packages/core/src/lib/callback-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ export async function handleLogin(

return { session, user: userByAccount, isNewUser }
} else {
const { provider: p } = options as InternalOptions<"oauth" | "oidc">
const { type, provider, providerAccountId, userId, ...tokenSet } = account
const defaults = { providerAccountId, provider, type, userId }
account = Object.assign(p.account(tokenSet), defaults)

if (user) {
// If the user is already signed in and the OAuth account isn't already associated
// with another user account then we can go ahead and link the accounts safely.
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.