diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c2b5f5e5..936fe5c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,10 +29,10 @@ jobs: run: | echo testing > internal/assets/version - - name: Build frontend + - name: Lint frontend run: | cd frontend - bun run build + bun run lint - name: Copy frontend run: | diff --git a/frontend/src/lib/utils.ts b/frontend/src/lib/utils.ts index 5172a7c8..a451ae67 100644 --- a/frontend/src/lib/utils.ts +++ b/frontend/src/lib/utils.ts @@ -9,7 +9,7 @@ export const isValidUrl = (url: string) => { try { new URL(url); return true; - } catch (e) { + } catch { return false; } }; diff --git a/frontend/src/pages/continue-page.tsx b/frontend/src/pages/continue-page.tsx index dd03a4c1..b19205f3 100644 --- a/frontend/src/pages/continue-page.tsx +++ b/frontend/src/pages/continue-page.tsx @@ -76,7 +76,14 @@ export const ContinuePage = () => { clearTimeout(auto); clearTimeout(reveal); }; - }, []); + }, [ + handleRedirect, + isAllowedRedirectProto, + isHttpsDowngrade, + isLoggedIn, + isTrustedRedirectUri, + isValidRedirectUri, + ]); if (!isLoggedIn) { return ( diff --git a/frontend/src/pages/login-page.tsx b/frontend/src/pages/login-page.tsx index 2f3bc99f..b39c5801 100644 --- a/frontend/src/pages/login-page.tsx +++ b/frontend/src/pages/login-page.tsx @@ -119,6 +119,8 @@ export const LoginPage = () => { !isLoggedIn && redirectUri ) { + // Not sure of a better way to do this + // eslint-disable-next-line react-hooks/set-state-in-effect setOauthAutoRedirectHandover(true); oauthMutation.mutate(oauthAutoRedirect); redirectButtonTimer.current = window.setTimeout(() => { @@ -126,7 +128,15 @@ export const LoginPage = () => { }, 5000); } } - }, []); + }, [ + isMounted, + oauthProviders.length, + providers, + isLoggedIn, + redirectUri, + oauthAutoRedirect, + oauthMutation, + ]); useEffect( () => () => {