fix: make query check account for spaces

This commit is contained in:
Stavros
2025-02-16 21:14:09 +02:00
parent 0da82ae3fe
commit 0f8d2e7fde
4 changed files with 9 additions and 5 deletions

View File

@@ -20,6 +20,7 @@ import { GoogleIcon } from "../icons/google";
import { GithubIcon } from "../icons/github";
import { OAuthIcon } from "../icons/oauth";
import { TailscaleIcon } from "../icons/tailscale";
import { isQueryValid } from "../utils/utils";
export const LoginPage = () => {
const queryString = window.location.search;
@@ -70,7 +71,7 @@ export const LoginPage = () => {
color: "green",
});
setTimeout(() => {
if (redirectUri === "null" || redirectUri === "") {
if (isQueryValid(redirectUri)) {
window.location.replace("/");
} else {
window.location.replace(`/continue?redirect_uri=${redirectUri}`);