Skip to content

Commit

Permalink
Merge branch 'main' into feat/nextjs-auth
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsorban44 committed May 19, 2023
2 parents bc3ba23 + 7711eb0 commit d52cd83
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/lib/callback-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export async function handleLogin(
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)
account = Object.assign(p.account(tokenSet) ?? {}, defaults)

if (user) {
// If the user is already signed in and the OAuth account isn't already associated
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/providers/oauth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export type ProfileCallback<Profile> = (
tokens: TokenSet
) => Awaitable<User>

export type AccountCallback = (tokens: TokenSet) => TokenSet
export type AccountCallback = (tokens: TokenSet) => TokenSet | undefined | void

export interface OAuthProviderButtonStyles {
logo: string
Expand Down

0 comments on commit d52cd83

Please sign in to comment.