diff --git a/client/pages/Login.tsx b/client/pages/Login.tsx index 48e76501..e9c083d6 100644 --- a/client/pages/Login.tsx +++ b/client/pages/Login.tsx @@ -407,6 +407,25 @@ export default function Login() { Google + { + const u = new URL( + "/api/discord/oauth/start", + API_BASE, + ); + const next = new URLSearchParams( + window.location.search, + ).get("next"); + if (next && next.startsWith("/")) + u.searchParams.set("state", JSON.stringify({ redirectTo: next })); + window.location.href = u.toString(); + }} + > + + Discord +