swagger-api / swagger-api/swagger-ui
swagger-ui-react option to enable pkce
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
Context
We are using backstage.io as a dev portal - which is using SwaggerUI React to render OpenAPI specs.
Everything is working fine - except the authorization part: Our SSO uses Authorization Code Grant with PKCE.
With my standalone setup and the usePkceWithAuthorizationCodeGrant flag everything works as expected. But I could not manage to enable it in the swagger-ui-react component.
What I tried
If I run a standalone SwaggerUI instance with OAUTH_USE_PKCE=true (which is the equivalent to usePkceWithAuthorizationCodeGrant in the initOAuth method) everything works fine.
What I'd wish for
Add a prop to the list that maps to the usePkceWithAuthorizationCodeGrant flag in the initOAuth method
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the swagger-ui-react props list and the initOAuth method, then trace how React component options reach OAuth configuration. Confirm how usePkceWithAuthorizationCodeGrant is exposed in standalone Swagger UI and make the React prop enable the same flag; verify the prop is documented and covered by the relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- authentication, frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100