Use API base env for Roblox OAuth start
cgen-10776a1a02b94c7e91ace6857336312e
This commit is contained in:
parent
737b1b4430
commit
10fb923b32
1 changed files with 2 additions and 1 deletions
|
|
@ -343,7 +343,8 @@ export default function Login() {
|
|||
variant="outline"
|
||||
className="w-full hover-lift interactive-scale"
|
||||
onClick={() => {
|
||||
const u = new URL(window.location.origin + "/api/roblox/oauth/start");
|
||||
const apiBase = (import.meta as any)?.env?.VITE_API_BASE || window.location.origin;
|
||||
const u = new URL("/api/roblox/oauth/start", apiBase);
|
||||
const next = new URLSearchParams(window.location.search).get("next");
|
||||
if (next && next.startsWith("/")) u.searchParams.set("state", next);
|
||||
window.location.href = u.toString();
|
||||
|
|
|
|||
Loading…
Reference in a new issue