Skip to content

Commit

Permalink
feat: clear loginChallenge queryparam on auth page if we couldn't loa…
Browse files Browse the repository at this point in the history
…d it
  • Loading branch information
porcellus committed Sep 28, 2024
1 parent 6c7ff10 commit 5c1e743
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
6 changes: 1 addition & 5 deletions lib/build/index2.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { TranslationContextProvider } from "../../../../../translation/translati
import { defaultTranslationsCommon } from "../../../../../translation/translations";
import { UserContextProvider, useUserContext } from "../../../../../usercontext";
import {
clearQueryParams,
getRedirectToPathFromURL,
getTenantIdFromQueryParams,
mergeObjects,
Expand Down Expand Up @@ -192,11 +193,7 @@ const AuthPageInner: React.FC<AuthPageProps> = (props) => {
}
},
() => {
return SuperTokens.getInstanceOrThrow().redirectToAuth({
navigate: props.navigate,
redirectBack: false,
userContext,
});
return clearQueryParams(["loginChallenge"]);
}
);

Expand Down

0 comments on commit 5c1e743

Please sign in to comment.