Skip to content

Commit

Permalink
fix: screen=previous two step registration
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-jonas committed Nov 13, 2024
1 parent b40606c commit 60305f6
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions selfservice/strategy/profile/two_step_registration.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,15 @@ func (s *Strategy) Register(w http.ResponseWriter, r *http.Request, regFlow *reg
return s.handleRegistrationError(r, regFlow, params, err)
}

if params.Method == "profile" || params.Screen == RegistrationScreenCredentialSelection {
return s.displayStepTwoNodes(ctx, w, r, regFlow, i, params)
} else if params.Method == "profile:back" {
if params.Method == "profile:back" {
// "profile:back" is kept for backwards compatibility.
span.AddEvent(semconv.NewDeprecatedFeatureUsedEvent(ctx, "profile:back"))
return s.displayStepOneNodes(ctx, w, r, regFlow, params)
} else if params.Screen == RegistrationScreenPrevious {
return s.displayStepOneNodes(ctx, w, r, regFlow, params)
} else if params.Method == "profile" {
if params.Screen == RegistrationScreenPrevious {
return s.displayStepOneNodes(ctx, w, r, regFlow, params)
}
return s.displayStepTwoNodes(ctx, w, r, regFlow, i, params)
}

// Default case
Expand Down

0 comments on commit 60305f6

Please sign in to comment.