fix(op): return state in token response only for implicit flow
This commit is contained in:
parent
976b40620c
commit
8e605a4cc4
1 changed files with 4 additions and 1 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue