Skip to content

Commit

Permalink
Update index.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
ThangHuuVu committed Jul 27, 2024
1 parent 7fdda40 commit 6f63282
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/core/src/lib/actions/callback/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -324,12 +324,8 @@ export async function callback(
)
const user = userFromAuthorize

if (!user) {
console.error(
"Read more at https://errors.authjs.dev/#credentialssignin"
)
throw new CredentialsSignin()
} else user.id = user.id?.toString() ?? crypto.randomUUID()
if (!user) throw new CredentialsSignin()
else user.id = user.id?.toString() ?? crypto.randomUUID()

Check warning on line 328 in packages/core/src/lib/actions/callback/index.ts

View check run for this annotation

Codecov / codecov/patch

packages/core/src/lib/actions/callback/index.ts#L328

Added line #L328 was not covered by tests

const account = {
providerAccountId: user.id,
Expand Down

0 comments on commit 6f63282

Please sign in to comment.