Skip to content

Commit

Permalink
chrore: remove plural s
Browse files Browse the repository at this point in the history
  • Loading branch information
markusahlstrand committed Dec 6, 2024
1 parent 08a3b96 commit 45ecc17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/routes/oauth2/passwordless.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const passwordlessRoutes = new OpenAPIHono<{
const { client_id, email, send, authParams } = body;
const client = await getClient(env, client_id);

const loginSessions = await env.data.logins.create(client.tenant.id, {
const loginSession = await env.data.logins.create(client.tenant.id, {
authParams: { ...authParams, client_id, username: email },
expires_at: new Date(Date.now() + OTP_EXPIRATION_TIME).toISOString(),
...getClientInfo(ctx.req),
Expand All @@ -65,7 +65,7 @@ export const passwordlessRoutes = new OpenAPIHono<{
const code = await env.data.codes.create(client.tenant.id, {
code_id: generateOTP(),
code_type: "otp",
login_id: loginSessions.login_id,
login_id: loginSession.login_id,
expires_at: new Date(Date.now() + OTP_EXPIRATION_TIME).toISOString(),
});

Expand Down

0 comments on commit 45ecc17

Please sign in to comment.