Skip to content

Commit

Permalink
fix: new settings flow with required mfa shouldn't be added to login …
Browse files Browse the repository at this point in the history
…flow return_to unless it contains a return_to parameter
  • Loading branch information
Benehiko committed Jun 19, 2023
1 parent f3aaa0e commit 7ffa1e1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion selfservice/flow/settings/handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,6 @@ func TestHandler(t *testing.T) {
}
q := url.Query()
q.Add("aal", "aal2")
q.Add("return_to", conf.SelfPublicURL(ctx).String()+settings.RouteInitBrowserFlow)
url.RawQuery = q.Encode()

assertx.EqualAsJSON(t, session.NewErrAALNotSatisfied(url.String()), json.RawMessage(body))
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/cypress/integration/profiles/mfa/totp.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ context("2FA TOTP", () => {
})
cy.get('*[name="method"][value="totp"]').click()
cy.location("pathname").should((loc) => {
expect(loc).to.oneOf(["/welcome", "/", "/sessions"])
expect(loc).to.eq("/settings")
})
cy.getSession({
expectAal: "aal2",
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/profiles/mfa/.kratos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ selfservice:
settings:
ui_url: http://localhost:4455/settings
privileged_session_max_age: 5m
required_aal: aal1
required_aal: highest_available

logout:
after:
Expand Down Expand Up @@ -47,4 +47,4 @@ identity:

session:
whoami:
required_aal: aal1
required_aal: highest_available

0 comments on commit 7ffa1e1

Please sign in to comment.