docusaurus-openapi-docs icon indicating copy to clipboard operation
docusaurus-openapi-docs copied to clipboard

401 Unauthorized ignored

Open andreazerbini opened this issue 1 year ago • 3 comments

Describe the bug

Attempting to access to an endpoint that require bearer token, if BE responds with a 401 status, the UI doesn't show any information of that problem. It seems that nothing had happened.

Expected behavior

Expected behavior: the user is informed that bearer token is not authorized to access to that endpoint.

Current behavior

Current behavior: nothing had happened.

Steps to reproduce

Sending a request without a valid token to an endpoint that requires a bearer token.

Screenshots

d9f88ea1-4af6-4877-be1b-9602ba9d31f3

Your Environment

  • Version used: v3.0.0-beta.4 (Docusaurus version 3.1.0)
  • Environment name and version:
    • Docusaurus side: Chrome Browser 122.0.6261.71 (Official build 64 bit);
    • BE side: SpringBoot BE engine and NGINX web server
  • Operating System and version (desktop or mobile): Windows 11 Desktop

andreazerbini avatar Mar 06 '24 09:03 andreazerbini

Hi @andreazerbini, are you certain the requests aren't also getting blocked by CORS?

sserrata avatar Jun 28 '24 18:06 sserrata

Hi @sserrata yes we are certain because CORS error is not reported as 401. Furthermore, if we correctly insert the Authorization bearer header it works correctly, instead if it had been a "CORS problem" it would have continued to give a CORS error. If you need some other details le me know. Thank you so much. Ps. if you need a mocked DTO of request and response let me know.

andreazerbini avatar Jul 11 '24 13:07 andreazerbini

I'm also facing this issue, is there anything specific we have to do which are not mentioned in the instructions?

ashrafchowdury avatar Aug 20 '24 12:08 ashrafchowdury