Skip to content

Commit 90a0e20

Browse files
authored
chore: properly handle session_aal2_required errors on session (#456)
1 parent 2ffe543 commit 90a0e20

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.github/workflows/licenses.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ jobs:
1818
steps:
1919
- name: Install script
2020
uses: ory/ci/licenses/setup@master
21-
with:
22-
token: ${{ secrets.ORY_BOT_PAT || secrets.GITHUB_TOKEN }}
2321
- name: Check licenses
2422
uses: ory/ci/licenses/check@master
2523
- name: Write, commit, push licenses

contrib/fetch/src/utils.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
isNeedsPrivilegedSessionError,
1010
isResponseError,
1111
isSelfServiceFlowExpiredError,
12+
isSessionAal2Required,
1213
} from "./error"
1314

1415
export type ValidationErrorHandler<T> = (body: T) => void
@@ -80,6 +81,9 @@ export const handleFlowError =
8081
} else if (isNeedsPrivilegedSessionError(body)) {
8182
opts.onRedirect(body.redirect_browser_to, true)
8283
return
84+
} else if (isSessionAal2Required(body)) {
85+
opts.onRedirect(body.redirect_browser_to, true)
86+
return
8387
} else if (isCsrfError(body)) {
8488
opts.onRestartFlow()
8589
return

0 commit comments

Comments
 (0)