Skip to content

Commit

Permalink
await createSession()
Browse files Browse the repository at this point in the history
  • Loading branch information
delbaoliveira committed Mar 13, 2024
1 parent c8acf0f commit 9a05f2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ export async function signup(state: FormState, formData: FormData) {
})
.returning({ id: users.id });

// 5. Create a session for the user
if (data && data.length > 0) {
const user = data[0];
// 5. Create a session for the user
createSession(user.id);
await createSession(user.id);
}
} catch (error) {
return {
Expand Down

0 comments on commit 9a05f2e

Please sign in to comment.