Skip to content

Commit

Permalink
fix: store provider
Browse files Browse the repository at this point in the history
  • Loading branch information
alnr committed Aug 27, 2024
1 parent 872581e commit ceff2da
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,18 +130,18 @@
"attributes": {
"name": "provider",
"type": "submit",
"value": "neverPKCE",
"value": "forcePKCE",
"disabled": false,
"node_type": "input"
},
"messages": [],
"meta": {
"label": {
"id": 1040002,
"text": "Sign up with neverPKCE",
"text": "Sign up with forcePKCE",
"type": "info",
"context": {
"provider": "neverPKCE"
"provider": "forcePKCE"
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions selfservice/strategy/oidc/strategy_login.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,10 @@ func (s *Strategy) Login(w http.ResponseWriter, r *http.Request, f *login.Flow,
span.SetAttributes(attribute.Bool("pkce", ok))
}

if err := storeProvider(f, pid); err != nil {
return nil, s.handleError(w, r, f, pid, nil, errors.WithStack(herodot.ErrInternalServerError.WithReason("Could not update flow context").WithDebug(err.Error())))

Check warning on line 283 in selfservice/strategy/oidc/strategy_login.go

View check run for this annotation

Codecov / codecov/patch

selfservice/strategy/oidc/strategy_login.go#L283

Added line #L283 was not covered by tests
}

f.Active = s.ID()
if err = s.d.LoginFlowPersister().UpdateLoginFlow(ctx, f); err != nil {
return nil, s.handleError(w, r, f, pid, nil, errors.WithStack(herodot.ErrInternalServerError.WithReason("Could not update flow").WithDebug(err.Error())))
Expand Down

0 comments on commit ceff2da

Please sign in to comment.