mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-13 19:44:21 +00:00
fix(oauth2): correctly return an error on client_credentials and jwt_profile (#8092)
# Which Problems Are Solved
When an error occurred during the oidc session creation from
client_credentials or jwt_profile, the error was ignored.
# How the Problems Are Solved
Return the error.
# Additional Changes
None.
# Additional Context
- relates to #7822
- noticed internally
- backport to 2.53.x
(cherry picked from commit 448f8f2c11
)
This commit is contained in:
parent
663484e1fb
commit
fb5b4cff58
@ -46,6 +46,9 @@ func (s *Server) ClientCredentialsExchange(ctx context.Context, r *op.ClientRequ
|
|||||||
nil,
|
nil,
|
||||||
false,
|
false,
|
||||||
)
|
)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
return response(s.accessTokenResponseFromSession(ctx, client, session, "", "", false, true, false, false))
|
return response(s.accessTokenResponseFromSession(ctx, client, session, "", "", false, true, false, false))
|
||||||
}
|
}
|
||||||
|
@ -54,6 +54,9 @@ func (s *Server) JWTProfile(ctx context.Context, r *op.Request[oidc.JWTProfileGr
|
|||||||
nil,
|
nil,
|
||||||
false,
|
false,
|
||||||
)
|
)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
return response(s.accessTokenResponseFromSession(ctx, client, session, "", "", false, true, false, false))
|
return response(s.accessTokenResponseFromSession(ctx, client, session, "", "", false, true, false, false))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user