mirror of
				https://github.com/steveiliop56/tinyauth.git
				synced 2025-11-03 23:55:44 +00:00 
			
		
		
		
	Compare commits
	
		
			3 Commits
		
	
	
		
			feat/light
			...
			main
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					20fb63532c | ||
| 
						 | 
					5f7e89c330 | ||
| 
						 | 
					330c7aa8f1 | 
							
								
								
									
										5
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							@@ -29,6 +29,11 @@ jobs:
 | 
			
		||||
        run: |
 | 
			
		||||
          echo testing > internal/assets/version
 | 
			
		||||
 | 
			
		||||
      - name: Lint frontend
 | 
			
		||||
        run: |
 | 
			
		||||
          cd frontend
 | 
			
		||||
          bun run lint
 | 
			
		||||
 | 
			
		||||
      - name: Build frontend
 | 
			
		||||
        run: |
 | 
			
		||||
          cd frontend
 | 
			
		||||
 
 | 
			
		||||
@@ -9,7 +9,7 @@ export const isValidUrl = (url: string) => {
 | 
			
		||||
  try {
 | 
			
		||||
    new URL(url);
 | 
			
		||||
    return true;
 | 
			
		||||
  } catch (e) {
 | 
			
		||||
  } catch {
 | 
			
		||||
    return false;
 | 
			
		||||
  }
 | 
			
		||||
};
 | 
			
		||||
 
 | 
			
		||||
@@ -76,7 +76,14 @@ export const ContinuePage = () => {
 | 
			
		||||
      clearTimeout(auto);
 | 
			
		||||
      clearTimeout(reveal);
 | 
			
		||||
    };
 | 
			
		||||
  }, []);
 | 
			
		||||
  }, [
 | 
			
		||||
    handleRedirect,
 | 
			
		||||
    isAllowedRedirectProto,
 | 
			
		||||
    isHttpsDowngrade,
 | 
			
		||||
    isLoggedIn,
 | 
			
		||||
    isTrustedRedirectUri,
 | 
			
		||||
    isValidRedirectUri,
 | 
			
		||||
  ]);
 | 
			
		||||
 | 
			
		||||
  if (!isLoggedIn) {
 | 
			
		||||
    return (
 | 
			
		||||
 
 | 
			
		||||
@@ -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(
 | 
			
		||||
    () => () => {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user