cancel
Showing results for 
Search instead for 
Did you mean: 

Swagger UI: authorization modal logout/authorize issue

Occasional Visitor

Swagger UI: authorization modal logout/authorize issue

Library version:

swagger-ui-dist#3.32.5

Problem :

It is not possible to authorize again inside same 'Authorization modal' after logout is clicked

Steps to reproduce :

1. Click 'Authorize' button in Swagger UI
2. enter proper client id and client secrets.

3. check necessary scopes

4. click Authorize button below.

5. do proper auth actions in a separate tab.

6. After successful auth process second tab is closed and 'Logout' button appears instead of 'Authorize' (meanwhile auth token endpoint is accessed with proper authorization code)

7. click 'Logout' button (it should be disappear and 'Authorize' should appear. Also clientid+clientsecret + checkboxes remain with the same data)
8. click Authorize.

9. do necessary auth actions in separate tab

10. see next error response in 'Authorization modal' : Auth ErrorError, error: invalid_grant, description: Authorization code is invalid or expired.
Investigation results:
1. oauth2-redirect.html endpoint sends proper authorization code back to main tab.
2. however authActions.authorizeRequest will receive auth code from first authentication try (steps 1-5)

3. It seems redux state is not properly updated during recieving callback from oauth2-redirect.html

4. issue is reproducible on local environment as well as in swagger hub.

Tags (1)
1 REPLY 1
Moderator

Re: Swagger UI: authorization modal logout/authorize issue

Hi Dmitry,

 

Thanks for the detailed issue report. Could you please open an issue in Swagger UI's issue tracker at the link below? --

https://github.com/swagger-api/swagger-ui/issues

 

If possible, please also provide a sample OpenAPI definition to reproduce the issue.


Helen Kosova
SmartBear Documentation Team Lead
________________________
Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors