Fix oauth2-redirect outside of the base swagger path #177
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
When you use Oaut2 implicit flow, swagger ui sends an url that not includes the path where the swagger ui is located to the authorization page
If you include swaggo in your project like this:
You will get this redirect url in the oauth2 implicit flow:
This url is not found due to his location is
{protocol}//{host}/swagger/oauth2-redirect.html
actually
Relation issue
The issue is #115
Additional context
I add the minimun changes to make it work.
PD: sorry for the other changes fmt did his work :D and I think it could be worth
cc: @ubogdan @DeyiXu
The following images belong to my own project that can be a proof of how it works


Sorry for my broken english, I'm from Spain :D