mirror of
https://github.com/iflytek/skillhub.git
synced 2026-08-28 11:25:00 +00:00
* fix(auth): use SimpleUrlAuthenticationSuccessHandler for OAuth2 login Replace SavedRequestAwareAuthenticationSuccessHandler with SimpleUrlAuthenticationSuccessHandler to prevent redirecting to saved API requests after OAuth2 login. Previously, when a user accessed a protected API endpoint (e.g., /api/web/skills) without authentication, Spring Security would save that request. After OAuth2 login, the handler would redirect back to the API endpoint instead of the dashboard. Now the handler only uses: - returnTo parameter from session (if present) - default target URL (/dashboard) as fallback * test(auth): add regression for OAuth2 success redirect; restore clearAuthenticationAttributes Cover the no-returnTo + cached-API-request branch with HttpSessionRequestCache so the original bug (post-login redirect resolving to /api/web/skills) cannot be silently reintroduced. Also restore clearAuthenticationAttributes() in the returnTo branch so it stays symmetric with the default branch (super clears it). --------- Co-authored-by: xiose <huyanlin@nuaa.edu.cn> |
||
|---|---|---|
| .. | ||
| .mvn | ||
| scripts | ||
| skillhub-app | ||
| skillhub-auth | ||
| skillhub-domain | ||
| skillhub-infra | ||
| skillhub-notification | ||
| skillhub-search | ||
| skillhub-storage | ||
| .dockerignore | ||
| Dockerfile | ||
| Dockerfile.dev | ||
| mvnw | ||
| mvnw.cmd | ||
| pom.xml | ||