From af36c59851399194bcbb77a3093d46c2757cb7b4 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Fri, 9 Aug 2024 23:30:10 +0900 Subject: feat: support authentication via fortee --- frontend/app/routes/login.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'frontend/app/routes') diff --git a/frontend/app/routes/login.tsx b/frontend/app/routes/login.tsx index dc87d47..d6414f7 100644 --- a/frontend/app/routes/login.tsx +++ b/frontend/app/routes/login.tsx @@ -3,7 +3,7 @@ import type { LoaderFunctionArgs, MetaFunction, } from "@remix-run/node"; -import { Form } from "@remix-run/react"; +import { Form, useLocation } from "@remix-run/react"; import { ensureUserNotLoggedIn, login } from "../.server/auth"; export const meta: MetaFunction = () => [ @@ -20,6 +20,10 @@ export async function action({ request }: ActionFunctionArgs) { } export default function Login() { + const location = useLocation(); + const searchParams = new URLSearchParams(location.search); + const registrationToken = searchParams.get("registration_token"); + return (
+