diff --git a/client/core/ts/package.json b/client/core/ts/package.json index 08408954d..70187dac2 100644 --- a/client/core/ts/package.json +++ b/client/core/ts/package.json @@ -13,7 +13,7 @@ "build": "tsc" }, "dependencies": { - "mogh_auth_client": "^1.2.0" + "mogh_auth_client": "^1.2.1" }, "devDependencies": { "typescript": "^5.6.3" diff --git a/client/core/ts/yarn.lock b/client/core/ts/yarn.lock index 8a0121efb..8f02ef793 100644 --- a/client/core/ts/yarn.lock +++ b/client/core/ts/yarn.lock @@ -7,10 +7,10 @@ jwt-decode@^4.0.0: resolved "https://registry.yarnpkg.com/jwt-decode/-/jwt-decode-4.0.0.tgz#2270352425fd413785b2faf11f6e755c5151bd4b" integrity sha512-+KJGIyHgkGuIq3IEBNftfhW/LfWhXUIY6OmyVWjliu5KH1y0fw7VQ8YndE2O4qZdMSd9SqbnC8GOcZEy0Om7sA== -mogh_auth_client@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/mogh_auth_client/-/mogh_auth_client-1.2.0.tgz#d840abb85c967133570f247e0d671ac4054db3ff" - integrity sha512-d60lSNzbOJcZwwSeyn7jLBmNI0FQTpXtOjR/OJj3M5KnUpmofpjlgGqLYGbVsZkoVipqohhi7aM2uVHEiicCVQ== +mogh_auth_client@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/mogh_auth_client/-/mogh_auth_client-1.2.1.tgz#c8b5e9da101dc8da7b30586e5c5463f5f7a95edb" + integrity sha512-8uUjgqagwbMW8BKtTRzfQ4txpw+54hqLszbIvcYf99murVIQu5+NsRZ8/vjP/fOMawgXJXCVsR6O2lamm1BCnQ== dependencies: jwt-decode "^4.0.0" diff --git a/ui/src/lib/hooks.ts b/ui/src/lib/hooks.ts index ed7c240a2..6fdd67d1a 100644 --- a/ui/src/lib/hooks.ts +++ b/ui/src/lib/hooks.ts @@ -127,7 +127,9 @@ export function useAuthState() { const search = new URLSearchParams(location.search); const _passkey = search.get("passkey"); - const passkey = _passkey ? JSON.parse(atob(_passkey)) : null; + const passkey = _passkey + ? JSON.parse(MoghAuth.Passkey.base64UrlDecode(_passkey)) + : null; // guard against multiple reqs sent // maybe isPending would do this but not sure about with render loop, this for sure will.