Description
Is your feature request related to a problem?
The oauth2-redirect page (https://github.com/swagger-api/swagger-ui/blob/master/dev-helpers/oauth2-redirect.html) is looking for the originator of the oauth2 flow using window.opener
. If we authorize the user through a link to this page provided in an email, the page will not find an opener and crash with
Uncaught TypeError: Cannot read property 'swaggerUIRedirectOauth2' of null
at run (o2c.html:9)
at onload (VM9 o2c.html:3)
Describe the solution you'd like
The callback page could fallback to rendering the swagger ui with the provided credentials if no opener can be found.
This does come at the expense of spawning new tabs and not being able to compare the sent payload with the one received from the server.
If there is a recommended way for generating callback links to include in emails I'd be interested to know more.
Describe alternatives you've considered
None. Allowing the swagger ui to accept a provided jwt might work as we can always get it from the callback link.