Skip to content

Commit

Permalink
chore: synchronize workspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
aeneasr committed Oct 27, 2023
1 parent 4df21fd commit 3a372fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion consent/helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ func TestValidateCsrfSession(t *testing.T) {
assert.NoError(t, err, "failed to save cookie %s", c.name)
}

err := ValidateCsrfSession(r, config, store, name, tc.csrfValue)
err := ValidateCsrfSession(r, config, store, name, tc.csrfValue, nil)
if tc.expectError {
assert.Error(t, err)
} else {
Expand Down
6 changes: 4 additions & 2 deletions flow/flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,11 @@ func (f *Flow) HandleLoginRequest(h *consent.HandledLoginRequest) error {
f.LoginExtendSessionLifespan = h.ExtendSessionLifespan
f.ACR = h.ACR
f.AMR = h.AMR
if h.Context == nil {

if len(h.Context) > 0 {
f.Context = h.Context
}

f.LoginWasUsed = h.WasHandled
f.LoginAuthenticatedAt = h.AuthenticatedAt
return nil
Expand Down Expand Up @@ -390,7 +392,7 @@ func (f *Flow) HandleConsentRequest(r *consent.AcceptOAuth2ConsentRequest) error
f.ConsentWasHandled = r.WasHandled
f.ConsentError = r.Error

if r.Context != nil {
if len(r.Context) > 0 {
f.Context = r.Context
}

Expand Down

0 comments on commit 3a372fd

Please sign in to comment.