swagger-api / swagger-api/swagger-ui

swagger-ui-react option to enable pkce

Open
#9,771 0 comments 6 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.