mirror of
				https://github.com/steveiliop56/tinyauth.git
				synced 2025-11-04 08:05:42 +00:00 
			
		
		
		
	refactor: skip all checks when disable continue is enabled
This commit is contained in:
		@@ -50,26 +50,6 @@ export const ContinuePage = () => {
 | 
				
			|||||||
    );
 | 
					    );
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (
 | 
					 | 
				
			||||||
    window.location.protocol === "https:" &&
 | 
					 | 
				
			||||||
    uri.protocol === "http:"
 | 
					 | 
				
			||||||
  ) {
 | 
					 | 
				
			||||||
    return (
 | 
					 | 
				
			||||||
      <ContinuePageLayout>
 | 
					 | 
				
			||||||
        <Text size="xl" fw={700}>
 | 
					 | 
				
			||||||
          Insecure Redirect
 | 
					 | 
				
			||||||
        </Text>
 | 
					 | 
				
			||||||
        <Text>
 | 
					 | 
				
			||||||
          Your are logged in but trying to redirect from <Code>https</Code> to{" "}
 | 
					 | 
				
			||||||
          <Code>http</Code>, please click the button to redirect.
 | 
					 | 
				
			||||||
        </Text>
 | 
					 | 
				
			||||||
        <Button fullWidth mt="xl" onClick={redirect}>
 | 
					 | 
				
			||||||
          Continue
 | 
					 | 
				
			||||||
        </Button>
 | 
					 | 
				
			||||||
      </ContinuePageLayout>
 | 
					 | 
				
			||||||
    );
 | 
					 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  if (disableContinue) {
 | 
					  if (disableContinue) {
 | 
				
			||||||
    window.location.href = redirectUri;
 | 
					    window.location.href = redirectUri;
 | 
				
			||||||
    return (
 | 
					    return (
 | 
				
			||||||
@@ -82,6 +62,23 @@ export const ContinuePage = () => {
 | 
				
			|||||||
    );
 | 
					    );
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if (window.location.protocol === "https:" && uri.protocol === "http:") {
 | 
				
			||||||
 | 
					    return (
 | 
				
			||||||
 | 
					      <ContinuePageLayout>
 | 
				
			||||||
 | 
					        <Text size="xl" fw={700}>
 | 
				
			||||||
 | 
					          Insecure Redirect
 | 
				
			||||||
 | 
					        </Text>
 | 
				
			||||||
 | 
					        <Text>
 | 
				
			||||||
 | 
					          Your are trying to redirect from <Code>https</Code> to{" "}
 | 
				
			||||||
 | 
					          <Code>http</Code>, are you sure you want to continue?
 | 
				
			||||||
 | 
					        </Text>
 | 
				
			||||||
 | 
					        <Button fullWidth mt="xl" color="yellow" onClick={redirect}>
 | 
				
			||||||
 | 
					          Continue
 | 
				
			||||||
 | 
					        </Button>
 | 
				
			||||||
 | 
					      </ContinuePageLayout>
 | 
				
			||||||
 | 
					    );
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  return (
 | 
					  return (
 | 
				
			||||||
    <ContinuePageLayout>
 | 
					    <ContinuePageLayout>
 | 
				
			||||||
      <Text size="xl" fw={700}>
 | 
					      <Text size="xl" fw={700}>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user