Neilk1021 opened a new issue, #7338:
URL: https://github.com/apache/texera/issues/7338
### Feature Summary
Signing in to Texera currently happens on two unrelated surfaces, neither of
which is a login page.
- The local username/password form (`texera-local-login`) is embedded as a
350px column inside the **About** page, next to the marketing copy describing
the platform.
- The Google sign-in button lives in the **dashboard shell's navbar**, wired
straight into `DashboardComponent` — the component subscribes to
`SocialAuthService.authState`, exchanges the id token, and navigates, all as a
side concern of rendering the app chrome.
Because these are the only two entry points, `AuthGuardService` and the 401
`UnauthorizedHttpInterceptor` both have to redirect an unauthenticated user to
`/about`, where they land on a page of prose and have to find the form beside
it. The two surfaces are also gated by two independent config flags
(`localLogin`, `googleLogin`), so with certain combinations a visitor is
redirected to a page offering no way to sign in at all. Adding a third identity
provider means adding a third surface rather than a button.
### Proposed Solution or Design
Introduce a single dedicated login page and make it the only login surface.
1. **A `/login` route** registered at the top level of the router, as a
sibling of the `DashboardComponent` shell, so it renders in the root outlet
without the navbar and sidebar chrome — a full-page login rather than a panel
inside the app.
2. **`TexeraLoginComponent`** (`hub/component/login/`), a centred card with:
- tabbed local **Sign In** / **Sign Up**, shown only when `localLogin` is
enabled;
- a `social-buttons` block holding the Google button, shown only when
`googleLogin` is enabled — one entry per provider, so a future provider is one
more button in this block;
- the Google `authState` subscription, the id-token exchange, and
post-login navigation owned here instead of by the dashboard shell;
- `returnUrl` honoured on success, falling back to the user's workflows.
3. **`GuestGuardService`**, the mirror of `AuthGuardService`, guarding
`/login` so an already-signed-in user is sent on (to `returnUrl` when present)
rather than shown a sign-in form they have no use for.
4. **Redirects retargeted**: `AuthGuardService` and
`UnauthorizedHttpInterceptor` navigate to `LOGIN` instead of `ABOUT`,
preserving the existing `returnUrl` behaviour.
5. **The old surfaces removed**: delete `texera-local-login`, drop the
Google button and its auth wiring from `DashboardComponent`, and give the
navbar a plain **Sign in** link to `/login` for logged-out visitors.
`AboutComponent` becomes static marketing copy with no auth state to track.
### Affected Area
- Hub
- Workflow UI
--
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]