Skip to content

Commit

Permalink
fix(op): return state in token response only for implicit flow (#460)
Browse files Browse the repository at this point in the history
* fix(op): return state in token response only for implicit flow

* oops
  • Loading branch information
muhlemmer authored Oct 13, 2023
1 parent 976b406 commit 0dc2a6e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/op/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ func CreateTokenResponse(ctx context.Context, request IDTokenRequest, client Cli
if err != nil {
return nil, err
}
state = authRequest.GetState()
// only implicit flow requires state to be returned.
if code == "" {
state = authRequest.GetState()
}
}

exp := uint64(validity.Seconds())
Expand Down

0 comments on commit 0dc2a6e

Please sign in to comment.