Closed
Description
Describe the bug
- Using the Authorize button in Swagger UI no longer works; the bug is introduced in v2.8.4
To Reproduce
I have created a minimal project to reproduce the error. It consists of:
- An auth server
- An API
- A Spring Cloud Gateway
Steps to reproduce the behavior:
-
Verify that login works in swagger-ui with
springdoc-openapi
2.8.3:Get the source code:
git clone https://github.com/magnus-larsson/ml-auth-server-error.git cd ml-auth-server-error
Build and start the auth server, the API, and the gateway:
./gradlew build docker compose up -d --build
Open the Swagger UI and login:
- Open in a web browser: https://localhost:8443/openapi/swagger-ui.html
- Click on the Authorize button
- Select all available scopes
- Sign in using username
u
and passwordp
- Select all scopes and submit consent
- Login done
-
Update to
springdoc-openapi
2.8.5 inproduct-composite-service/build.gradle
and repeat the instruction above.-
After the sign in, an errorpage with the following text will now be displayed:
Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback. Sat Mar 08 16:01:11 UTC 2025 There was an unexpected error (type=None, status=999).
-