diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-03-08 10:51:41 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-03-08 10:51:41 +0900 |
| commit | a7ce31249948e4f0c1950de93f3c4f7cdda51cf4 (patch) | |
| tree | c4c740f0cccd15f825596f7a115f3b8f8eb8ffa7 /frontend/app/.server/auth.ts | |
| parent | 7f4d16dca85263dcbc7b3bb29f5fc50f4371739d (diff) | |
| parent | c06d46eae30c9468535fb6af5e9b822acadbbdb6 (diff) | |
| download | phperkaigi-2025-albatross-a7ce31249948e4f0c1950de93f3c4f7cdda51cf4.tar.gz phperkaigi-2025-albatross-a7ce31249948e4f0c1950de93f3c4f7cdda51cf4.tar.zst phperkaigi-2025-albatross-a7ce31249948e4f0c1950de93f3c4f7cdda51cf4.zip | |
Merge branch 'phperkaigi-2025'
Diffstat (limited to 'frontend/app/.server/auth.ts')
| -rw-r--r-- | frontend/app/.server/auth.ts | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/frontend/app/.server/auth.ts b/frontend/app/.server/auth.ts index 4df0924..386eb70 100644 --- a/frontend/app/.server/auth.ts +++ b/frontend/app/.server/auth.ts @@ -3,8 +3,8 @@ import type { Session } from "@remix-run/server-runtime"; import { jwtDecode } from "jwt-decode"; import { Authenticator } from "remix-auth"; import { FormStrategy } from "remix-auth-form"; -import { apiPostLogin } from "./api/client"; -import { components } from "./api/schema"; +import { apiPostLogin } from "../api/client"; +import { components } from "../api/schema"; import { createUnstructuredCookie } from "./cookie"; import { cookieOptions, sessionStorage } from "./session"; @@ -14,14 +14,7 @@ authenticator.use( new FormStrategy(async ({ form }) => { const username = String(form.get("username")); const password = String(form.get("password")); - const registrationToken = String(form.get("registration_token")); - return ( - await apiPostLogin( - username, - password, - registrationToken === "" ? null : registrationToken, - ) - ).token; + return (await apiPostLogin(username, password)).token; }), "default", ); |
