-
Notifications
You must be signed in to change notification settings - Fork 9.1k
OAuth2 flow not completing #1384
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
Comments
Which version of the UI do you use? |
I'm on 2.1.1 (master). As a further update to this, I dug in and found out that this was failing during the If it helps, my swagger installation is at: https://omtdev.unifiedcompliance.com:8500 |
This looks much related to #1324 - adding the client secret does fix the issue (PR upcoming if no one beats me to it :) ) |
@ankon Yes, it is the same issue / fix. |
Add support for oauth client secret when calling the token URL. Fixes swagger-api#1384. Fixes swagger-api#1324.
I have the following config:
The URLs are valid. When I click the On/Off switch, I get asked for the scope. I pick the only scope we have and click 'Authorize.' I get redirected to my oAuth login where I log in with valid credentials. I get redirected back to o2c.html with the proper oAuth code. That code calls
window.opener.processOAuthCode(qp);
then closes the window. Swagger UI then calls the /token endpoint but doesn't provide the client secret. This is where the flow fails.Which I suppose is to be expected because this block in index.html makes no sense:
The clientId is correct and it's set up correctly to redirect back to o2c.html. I have no idea what realm and appName are supposed to be or how they'd relate to oAuth in this case. I also tried using the implicit oAuth flow but had no luck with that as I don't think our server supports it.
So my questions:
swaggerUi.api.clientAuthorizations.add("key", new SwaggerClient.ApiKeyAuthorization("Authorization", "Bearer some_hash_here", "header"));
the API fails to make the call with this header. It's displayed in the curl call which works perfectly using curl so it's not an issue with the API itself but swagger. This is my fallback position for allowing testing of the oAuth2 API if Added regex to replace / with _ in resource name #1 above doesn't work, assuming that swagger-ui can be made to actually send the headers properly.The text was updated successfully, but these errors were encountered: