Skip to content

Commit

Permalink
Reuse db in auth flow
Browse files Browse the repository at this point in the history
  • Loading branch information
renatodellosso committed Feb 24, 2025
1 parent b84dba8 commit 790097a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/Auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,13 @@ export const AuthenticationOptions: AuthOptions = {
today.toDateString()
) {
// We use user.id since user._id strangely doesn't exist on user.
await getDatabase().then((db) =>
db.updateObjectById(
CollectionId.Users,
new ObjectId(typedUser._id?.toString()),
{
lastSignInDateTime: today,
},
),
);
);
}

new ResendUtils().createContact(typedUser as User);
Expand Down

0 comments on commit 790097a

Please sign in to comment.