Skip to content
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

oauth2 implicit flow #2

Open
vtmas opened this issue Apr 29, 2019 · 2 comments
Open

oauth2 implicit flow #2

vtmas opened this issue Apr 29, 2019 · 2 comments

Comments

@vtmas
Copy link

vtmas commented Apr 29, 2019

Hi Nathan,

Your "Documentation Portal tutorial" was awesome! :)

I already have a swagger based api, working with oauth2 implict flow. However when wiring it into your api portal i cannot get it work. I am being redirected correctly to
api-portal/oauth2-redirect.html#access_token=t&expires_in=3600&state=s&token_type=bearer
But its not picked up by the 'ui' as it usually is.

Is this something your portal should be capable of and I am missing something? Or is this something that you are planning to add?

Thank you,
Tamas

@nazwr
Copy link
Owner

nazwr commented May 1, 2019

Hey Tamas - glad you enjoyed the tutorial! Is the authentication issue related to supporting the 'Try It Out' functionality that is baked into SwaggerUI, or the front end in this repo making a call to the API you have for the JSON definition to render?

@vtmas
Copy link
Author

vtmas commented May 1, 2019

Hi, it's related to the authorize function with oauth2 with the front end with this repo.
The way it works with the 'native' swagger ui:

  1. The user clicks authorize, then he is redirected to the authorization server.
  2. Authorization server authorizes him and redirectes to the same host where the original ui is hosted except to the oauth2-redirect.html, not index.html. What oauth2-redirect.html does is it parses out the access token from the url path and stores it, and appends it to the 'Try It Out' curl command, same as with apiKey (which works with your portal aswell ).

What happens with your frontend i think that oauth2-redirect.html is not correctly hosted/integrated to the div. Because the redirect happens correctly except its not parsed.

I am not sure if I managed to answer your question :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants