Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docker/kratos/kratos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ selfservice:
- hook: session
oidc:
hooks:
- hook: session
- hook: show_verification_ui
- hook: session
webauthn:
hooks:
- hook: session
Expand Down
5 changes: 5 additions & 0 deletions pkg/kratos/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -1001,6 +1001,11 @@ func (s *Service) ParseRegistrationFlowMethodBody(r *http.Request) (*kClient.Upd
if err := parseBody(r.Body, &body); err != nil {
return nil, err
}
// Traits for OIDC registration must come from IdP-verified claims
// (docker/kratos/schema.jsonnet), never from client input. Without this,
// the identifier-first email (xxx@email.com) overrides the provider email
// (yyy@gmail.com) and the account registers under an unproven address.
body.Traits = nil
ret = kClient.UpdateRegistrationFlowWithOidcMethodAsUpdateRegistrationFlowBody(&body)
default:
return nil, fmt.Errorf("unknown method: %s", method)
Expand Down