swagger-ui-watcher
swagger-ui-watcher copied to clipboard
oauth2-redirect.html missing
I believe updating dependency to swagger-editor dist 3.6.26 fixes this.
A newer release of swagger-editor dist apparently adds https://github.com/swagger-api/swagger-ui/tree/v3.22.0 which includes the missing oauth2-redirect.html which causes an oauth2 authorization to otherwise fail with a 404 when redirecting back to the redirect_uri.
PS: Thanks for this cool tool!
Hi Alax,
I will look into this.
Thank you!
On Tue, Mar 26, 2019 at 8:52 AM Alan Crosswell [email protected] wrote:
I believe updating dependency to swagger-editor dist 3.6.26 fixes this.
A newer release of swagger-editor dist apparently adds https://github.com/swagger-api/swagger-ui/tree/v3.22.0 which includes the missing oauth2-redirect.html https://github.com/swagger-api/swagger-ui/commits/v3.22.0/dist/oauth2-redirect.html which causes an oauth2 authorization to otherwise fail with a 404 when redirecting back to the redirect_uri.
PS: Thanks for this cool tool!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/moon0326/swagger-ui-watcher/issues/31, or mute the thread https://github.com/notifications/unsubscribe-auth/AEgRyWpPng8FOuClJ7avAIGMjxgePUonks5vakJbgaJpZM4cLzze .
Moon Kyong Lead Software Engineer
310-917-6400 ext6688
1655 26th Street CA 90404 leafgroup.com
-- Please NOTE: This electronic message, including any attachments, may include privileged, confidential and/or inside information owned by Leaf Group. Any distribution or use of this communication by anyone other than the intended recipient(s) is strictly prohibited and may be unlawful. If you are not the intended recipient, please notify the sender by replying to this message and then delete it from your system. Thank you.
I tried forking this and changing the dependency to 3.6.22 but it seems the redirect_uri is still not found.
See https://github.com/swagger-api/swagger-editor/issues/1969
My workaround is to cp oauth2-redirect.html /usr/local/lib/node_modules/swagger-ui-watcher/node_modules/swagger-editor-dist/
Sorry for the delay in response. I think we can include swagger-ui: 3.22.0
as a dependency then add a new route in index.js (line #63)
app.get('/oauth2-redirect.html', function(req, res) {
res.sendFile(__dirname + "/node_modules/swagger-ui/dist/oauth2-redirect.html");
});
This should get the content of oauth2-redirect.html from the official swagger-ui package and response to http://localhost:{port}/oauth2-redirect.html.
You're welcome to make PR or I can also make a PR myself.
I may have missed it, but updating the documentation to include the redirect path would allow users to register their client with their Oauth2 provider more easily.