zhang-arvin opened a new pull request, #12538: URL: https://github.com/apache/gravitino/pull/12538
### What changes were proposed in this pull request? When the Gravitino server is configured with basic authentication, the `/configs` endpoint also requires authentication. During the initial bootstrap, the frontend calls `/configs` to determine the auth type, but since `authType` is not yet known, the request goes out without credentials and receives a 401. The axios response interceptor then redirects to `/login` before `authType` is ever persisted, causing the login page to show an indefinite spinner instead of the `BasicLogin` component. This PR fixes the chicken-and-egg problem by: 1. When `/configs` returns 401, set `authType='basic'` in localStorage before redirecting to `/login` 2. Skip the redirect when already on the `/login` page to avoid an infinite redirect loop — the Redux store will pick up `authType` from localStorage and render `BasicLogin` correctly ### Why are the changes needed? Fix: #12466 Without this fix, users cannot log in via the Web V2 UI when basic authentication is enabled on the server. The login page shows a loading spinner indefinitely. ### Does this PR introduce _any_ user-facing change? Yes — the Web V2 login page now correctly renders the username/password form when basic authentication is configured. ### How was this patch tested? Manual verification of the logic flow. The fix is purely in the frontend axios interceptor and does not affect any backend behavior. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
