Skip to content

armgit / ente

Public Imported from GitHub
0

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

[web] Add extra auth web issuer legacy period parsing

Manav Rathi9b71dad26b38
diff --git a/web/apps/auth/src/services/code.ts b/web/apps/auth/src/services/code.ts
index 0e53fde417..c974fda9f1 100644
--- a/web/apps/auth/src/services/code.ts
+++ b/web/apps/auth/src/services/code.ts
@@ -193,6 +193,10 @@ const parseIssuer = (url: URL, path: string): string => {
let issuer = url.searchParams.get("issuer");
if (issuer) {
// This is to handle bug in old versions of Ente Auth app.
+ const periodIndex = issuer.indexOf("period=");
+ if (periodIndex >= 0) {
+ issuer = issuer.substring(0, periodIndex);
+ }
if (issuer.endsWith("period")) {
issuer = issuer.substring(0, issuer.length - 6);
}