-
Notifications
You must be signed in to change notification settings - Fork 402
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
Bug: swaggerUIRedirectOauth2 null after redirect #4427
Comments
Hey @Thomas-McKanna! Thanks for opening this issue. I suspect that somewhere in the authentication mechanism it is not possible to read the properties of the Swagger main page. Let me explain the steps we took to authenticate and recover the token, which may help us identify the problem. 1 - When we set up OAuth2 authentication in 2 - When the authentication is successful and the OIDC Provider redirects to 3 - If I directly access the page Maybe you can test a few more scenarios to see if you can find the source of the problem? I haven't made much progress in identifying this here on my side. Thanks |
Hmmmm. I have been looking into this one for a while and I can't seem to figure it out. For some reason, browser is setting I'm using Cognito Hosted UI. I'm going to drop work on this one for now. @leandrodamascena Do you think it makes sense to keep this issue open in case someone else has the same issue? Otherwise, I will close it. |
Hi @Thomas-McKanna, I think we can have a call and if possible you can show me your scenario and I will try to reproduce it here. It is now 5PM here and I have until 6PM, if you can, we can talk for a few minutes and I can better understand the scenario you are in there. If you are having this problem, perhaps others are and we would like to get ahead of this. If you prefer, we can schedule this meeting the next week. Please send an email to |
(for my own on-call update).. this call happened. We might be able to get it released this Thursday, otherwise later this month |
Hello @Thomas-McKanna! I tried my best to find a way to solve this problem, but there's nothing we can do about it here. The problem is that we really need the opener's reference (the window/tab who opened the window/tab auth) to update SwaggerUI, without that there's nothing we can do. I'm closing this issue, but if you find a solution and/or we find one on our side, we can open it again. Thanks for insights and your patience. |
|
Expected Behaviour
Complete login flow to generate JWT access token.
Current Behaviour
When I click on "Authorize" button in Swagger UI, the login flow begins and I'm eventually redirected back to a URL like:
But at this point, the flow fails with a blank page. The HTML for the page is the correct "Redirect" generated HTML, but there is an error in the console like:
And it seems that no other Javascript is being loaded by the page.
Code snippet
Possible Solution
I wonder if the
swagger_js
generated for the main Swagger page is supposed to also be loaded in here, but is not because of the redirect flow resetting the web page (https://docs.powertools.aws.dev/lambda/python/latest/api/event_handler/openapi/swagger_ui/index.html).Steps to Reproduce
Should be able to use the config I gave in the code snippet, assuming you have an oauth2 identity provider at hand.
Powertools for AWS Lambda (Python) version
latest
AWS Lambda function runtime
3.10
Packaging format used
PyPi
Debugging logs
No response
The text was updated successfully, but these errors were encountered: