Skip to content

Commit

Permalink
Revert "fix: ignore aal2 flows in password populate"
Browse files Browse the repository at this point in the history
This reverts commit 2b1fe68.
  • Loading branch information
jonas-jonas committed Jun 20, 2024
1 parent 2b1fe68 commit ca2bf62
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 2 additions & 2 deletions selfservice/flow/login/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ preLoginHook:
switch strategy := s.(type) {
case FormHydrator:
switch {
case f.RequestedAAL == identity.AuthenticatorAssuranceLevel2:
populateErr = strategy.PopulateLoginMethodSecondFactor(r, f)
case f.IsRefresh():
populateErr = strategy.PopulateLoginMethodRefresh(r, f)
case f.RequestedAAL == identity.AuthenticatorAssuranceLevel1:
Expand All @@ -225,8 +227,6 @@ preLoginHook:
} else {
populateErr = strategy.PopulateLoginMethodFirstFactor(r, f)
}
case f.RequestedAAL == identity.AuthenticatorAssuranceLevel2:
populateErr = strategy.PopulateLoginMethodSecondFactor(r, f)
}
case OneStepFormHydrator:
populateErr = strategy.PopulateLoginMethod(r, f.RequestedAAL, f)
Expand Down
3 changes: 0 additions & 3 deletions selfservice/strategy/password/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,6 @@ func (s *Strategy) migratePasswordHash(ctx context.Context, identifier uuid.UUID
}

func (s *Strategy) PopulateLoginMethodRefresh(r *http.Request, sr *login.Flow) error {
if sr.RequestedAAL > identity.AuthenticatorAssuranceLevel1 {
return nil
}
identifier, id, _ := flowhelpers.GuessForcedLoginIdentifier(r, s.d, sr, s.ID())
if identifier == "" {
return nil
Expand Down

0 comments on commit ca2bf62

Please sign in to comment.