Skip to content

Commit

Permalink
fix: prevent registration strategy from continuing on oidc duplicate …
Browse files Browse the repository at this point in the history
…account
  • Loading branch information
Benehiko committed Mar 14, 2023
1 parent 9b1b977 commit 87d56ae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion selfservice/strategy/oidc/strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,10 @@ func (s *Strategy) handleError(w http.ResponseWriter, r *http.Request, f flow.Fl
if err != nil {
return err
}
// return a new login flow with the error message embedded in the login flow.
x.AcceptToRedirectOrJSON(w, r, s.d.Writer(), lf, lf.AppendTo(s.d.Config().SelfServiceFlowLoginUI(r.Context())).String())
return nil
// ensure the function does not continue to execute
return registration.ErrHookAbortFlow
}

rf.UI.Nodes = node.Nodes{}
Expand Down

0 comments on commit 87d56ae

Please sign in to comment.