-
Notifications
You must be signed in to change notification settings - Fork 13
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
[IMPROVEMENT] Use swagger_ui_init_oauth
parameter of original function app for versioned /docs (e.g. /v1/docs)
#45
Comments
Sure, I'll whip up a fix for this soon and let you know. Thanks for finding this! |
Alright, this should now be fixed in v3.0.2. Please let me know if you find any other problems. |
@alexschimpf, Thanks for taking care of that issue so quickly! Now I am able to see the client-id in the Authorize feature. I also tested it with our setup. I get forwarded to the right login page and can login in there -> scopes are also set correctly. But this runs into another issue. The redirect url cannot be found. This happens with the root docs (/docs) as well as with the versioned docs (/v1/docs). It appears as the When trying to login via the "Authorize" button I see the following This refers to a login I did via the root docs |
Ok I'll try to look into this once I get a chance |
Ah okay. I think I see the issue. For the main docs page, it happens because the redirect route is being stripped out in the Let me try to get a fix out for this. |
@alexschimpf Thanks for taking care of it :) |
@alexschimpf are there any updates on this? |
Sorry for the delay. I need to get back to this. I had a solution mostly written some time ago, but never got around to pushing it. Hopefully I can get something pushed this week. |
@alexschimpf, a happy new year to you! Thanks for providing the fix. I ran some local tests and the issues from above are resolved 🚀 |
Sorry for the long (ok, very long) delay. Been a busy bee. This fix is available in v4.0.1. |
Subject of the issue
I use
swagger_ui_init_oauth
when creating theFastAPI
instance. This allows me to use the set values when using the "Authorize" feature of the swagger UI. This is very handy as it allows to set the client id and scopes.I use it like this:
Applying the
Versionizer
does remove the values in versioned docs. It would be great if they are kept.When accessing "example.com/docs" I can see "my-client-id" is set. But when accessing "example.com/v1/docs" I can't see the client id in the Authorize feature.
Screenshots for further details:
Your environment
Steps to reproduce
Expected behaviour
I can use the Authorize feature in the versioned docs.
Actual behaviour
The values initialized with
swagger_ui_init_oauth
are not available in versioned docs (example.com/v1/docs)The text was updated successfully, but these errors were encountered: