Cleanup after ourselves

This commit is contained in:
Manav Rathi
2025-07-03 11:01:31 +05:30
parent e88a3b59e7
commit fd39c78e5d
2 changed files with 3 additions and 0 deletions

View File

@@ -64,6 +64,7 @@ const saveQueryCredentialsAndNavigateTo = async (
const inflightPasskeySessionID = nullToUndefined(
sessionStorage.getItem("inflightPasskeySessionID"),
);
if (
!inflightPasskeySessionID ||
passkeySessionID != inflightPasskeySessionID

View File

@@ -256,6 +256,8 @@ export const saveCredentialsAndNavigateTo = async (
// goes through the passkey flow in the browser itself (when they are using
// the web app).
sessionStorage.removeItem("inflightPasskeySessionID");
const { id, encryptedToken, keyAttributes } = response;
await setLSUser({ ...getData("user"), encryptedToken, id });