Fix: SSO Login Page (#5220)

Users logging in via OAuth2 were redirected to Spring's default login
form instead of the React frontend login page. This happened because the
OAuth2 configuration used `.loginPage("/oauth2")` which pointed to the
old Thymeleaf template.

### Testing (if applicable)

- [x] I have tested my changes locally. Refer to the [Testing
Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md#6-testing)
for more details.
This commit is contained in:
Dario Ghunney Ware
2025-12-10 19:46:48 +00:00
committed by GitHub
parent 3c92cb7c2b
commit d6a83fe6a1
3 changed files with 9 additions and 33 deletions

View File

@@ -66,7 +66,8 @@ public class OpenApiConfig {
if (swaggerServerUrl != null && !swaggerServerUrl.trim().isEmpty()) {
server = new Server().url(swaggerServerUrl).description("API Server");
} else {
// Use relative path so Swagger uses the current browser origin to avoid CORS issues when accessing via different ports
// Use relative path so Swagger uses the current browser origin to avoid CORS issues
// when accessing via different ports
server = new Server().url("/").description("Current Server");
}
openAPI.addServersItem(server);