Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Rearrange

Manav Rathi66f9dc98eefe
diff --git a/web/apps/accounts/src/services/passkey.ts b/web/apps/accounts/src/services/passkey.ts
index da026c42e6..b30155e483 100644
--- a/web/apps/accounts/src/services/passkey.ts
+++ b/web/apps/accounts/src/services/passkey.ts
@@ -354,14 +354,6 @@ export const isWhitelistedRedirect = (redirectURL: URL) =>
? _isWhitelistedRedirect(redirectURL)
: true;
-const _isWhitelistedRedirect = (redirectURL: URL) =>
- (isDevBuild && redirectURL.hostname.endsWith("localhost")) ||
- redirectURL.host.endsWith(".ente.io") ||
- redirectURL.host.endsWith(".ente.sh") ||
- redirectURL.protocol == "ente:" ||
- redirectURL.protocol == "enteauth:" ||
- redirectURL.protocol == "ente-cli:";
-
export const shouldRestrictToWhitelistedRedirect = () => {
// host includes port, hostname is sans port
const hostname = new URL(window.location.origin).hostname;
@@ -372,6 +364,14 @@ export const shouldRestrictToWhitelistedRedirect = () => {
);
};
+const _isWhitelistedRedirect = (redirectURL: URL) =>
+ (isDevBuild && redirectURL.hostname.endsWith("localhost")) ||
+ redirectURL.host.endsWith(".ente.io") ||
+ redirectURL.host.endsWith(".ente.sh") ||
+ redirectURL.protocol == "ente:" ||
+ redirectURL.protocol == "enteauth:" ||
+ redirectURL.protocol == "ente-cli:";
+
export interface BeginPasskeyAuthenticationResponse {
/**
* An identifier for this authentication ceremony / session.