Skip to content

[feat] Support password authorization schema #1914

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Yura2108 opened this issue May 27, 2025 · 2 comments
Open

[feat] Support password authorization schema #1914

Yura2108 opened this issue May 27, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@Yura2108
Copy link

What problem will this feature address?

Since I am using FastAPI Backend which automatically generates OpenAPI schemas I am facing the following problem:

FastAPI Docs: https://fastapi.tiangolo.com/tutorial/security/simple-oauth2/

The authorisation scheme that is used in OAuth2PasswordBearer in OpenAPI looks like this:

"securitySchemes": {
      "OAuth2PasswordBearer": {
        "type": "oauth2",
        "flows": {
          "password": {
            "scopes": {},
            "tokenUrl": "api/auth/login"
          }
        }
      }
    }

It is supported in OpenAPI:
https://spec.openapis.org/oas/latest.html#fixed-fields-24

You are authorizing with login & password and getting the access token, that you will pass in Authorisation: Bearer {token} header

So.. I want to see the authorization by Login & Password in documentation

Describe the solution you'd like

Add the Form with Login, Password, Client ID, Client Secret here:

{(flow === 'authorizationCode' || flow === 'clientCredentials') && (

And handle this here:

const authorize = useQuery(async (values: FormValues) => {

Describe alternatives you've considered

I thought about moving to authorisationCode (clientCredentials) inside my application, but this is not the documentation behaviour I would like.

Additional context

Example from Swagger UI:
Image

@Yura2108 Yura2108 added the enhancement New feature or request label May 27, 2025
@fuma-nama
Copy link
Owner

noticed that as well, will improve the OAuth UI

@fuma-nama
Copy link
Owner

Implemented: 5067efc
need more time for polishing the UI, I'll switch the current OpenAPI example to Scalar's Galaxy example so you can try it out on our official site as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants