docusaurus-openapi-docs
docusaurus-openapi-docs copied to clipboard
401 Unauthorized ignored
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
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
Hi @andreazerbini, are you certain the requests aren't also getting blocked by CORS?
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.
I'm also facing this issue, is there anything specific we have to do which are not mentioned in the instructions?