-
Notifications
You must be signed in to change notification settings - Fork 311
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
OAuth UI Support #2
Comments
Hi - I will try to fix the Oauth feature soon as it is in the codebase as much as possible. Later on maybe investigate if it can be put in the global api-key/token box. |
@dmyers I have updated the repro with a working Oauth. I have only tested it with the swagger pet store example. Didn't succed to access your api. The Auth0 implementation is different as you can both select scopes globally and on each operation. This solution is as close to the original swagger as i could get it for now. Please notice that the OAUTH button changes color indicating full cope fullfilment with green and partial with orange. Other changes : API info is placed in the sidebar at bottom. The schemes are prettified. The oauth token is populated to the token field in the sidebar when authorized successfully. Please notice that I have made changes to the swagger-oauth lib file and the client.js file. The client file is pulled from my own github repository. If you want to go on you should clone this to your own repo and make changes to the package.json file. Check out changes here |
The schemes look amazing! Yeah those are good points about the scope. The OAuth works really well now too. This thing is really getting solid. |
I've been trying to figure out how to get OAuth2 to work. I tried setting it up which it looks like this repo is missing some recent changes from Swagger UI that have enabled it out of the box by default by checking the definition and enabling it automatically.
You can enable it by adding the script file and uncommenting it.
swagger-api@ec86ee2
If you need an an example setup you could use the OAuth client ID and settings from mine:
http://api.monscierge.com/swagger/ui/index
I'm really hoping to fully switch to this. I could help any way I can though I'm unsure of the codebase right now. It looks to try to put the oauth toggler inline with the operations, but a better UI/UX might be to put it in the top-left sidenav next to api key maybe as a global? The scopes and stuff could be neat like Auth0 does maybe even.
The text was updated successfully, but these errors were encountered: