swagger-ui is not mapping oauth2-redirect.html #428
Labels
status: pr submitted
A pull request has been submitted for the issue
type: bug
Something isn't working
Describe the bug
Swagger-UI sets the redirect_uri for OAUTH2 requests to /oauth2-redirect.html. If this file doesn't exist, the Authorize dialog (after asking for scopes) returns to a 404 page (that includes a suggestion for /webjars/swagger-ui/3.20.9/oauth2-redirect.html).
Expected behavior
The authorize dialog successfully returns to swagger-ui with a token.
Expectation is that one of the following happens:
swagger-ui extension correctly configures swagger's redirect_uri to be /swagger-ui/oauth2-redirect.html (respecting parameters that may have changed /swagger-ui)
Micronaut is configured to respond to /oauth2-redirect.html
Actual behavior
The Authorize dialog (after asking for scopes) returns to a 404 page (that includes a suggestion for /webjars/swagger-ui/3.20.9/oauth2-redirect.html).
To reproduce
After login successful from the OKTA provider using Authorization code flow. The redirect URL from the swagger is below
http://localhost:8084/oauth2-redirect.html
This redirect URL cannot be found in the Micronauts application. The swagger UI should contain the redirect URL and should show the Authentication successful, and the redirect URL should be "https://localhost:8084/swagger/oauth2-redirect.html
Repo - https://github.com/anandjaisy/MicronautSwagger
Okta
Client Id - 0oa2lezagQ4wrRUnW5d6
Client secret - Z5amZFJcsW-OHC60q4sKqUOfNZG071SuCirMidg7
After successful login, the Micronaut application should display the swagger UI with a auth token
The text was updated successfully, but these errors were encountered: