echo-swagger icon indicating copy to clipboard operation
echo-swagger copied to clipboard

Add Proof Key for Code Exchange Support

Open PeterRodenkirchTNG opened this issue 1 year ago • 0 comments

Similar to the issue #243 in the gin-swagger repo, and https://github.com/swaggo/swag/issues/871:

Is your feature request related to a problem? Please describe. OAuth2 clients that only support Authorization Code Flow with PKCE do not work with the current feature set of echo-swagger.

Describe the solution Add Proof Key for Code Exchange support. There is a flag for it in Swagger UI 3.24.0+. The flag in Swagger UI is usePkceWithAuthorizationCodeGrant. In the corresponding Pull Request I added an additional attribute to the OAuthConfig struct called "UsePkce" which configures the boolean parameter for "usePkceWithAuthorizationCodeGrant" in the "initOAuth" part of the index template. With this small change, the auth flow works as expected.

PeterRodenkirchTNG avatar Feb 10 '23 10:02 PeterRodenkirchTNG