fix: hide register tip on login and redirect to setup when no super admin (#3556)

## Changes
- Removed the "Register here" link from the login page — it misled users into thinking public registration was open.
- Added redirect from /login to /register when no super admin exists (initial setup).
- Added an info alert on the register page clarifying the page is only for initial setup; additional users are invited from team settings. Hidden for the invite-token flow.
- Extracted shared useSuperAdminRedirect hook to dedupe identical fetch/redirect logic across Login and Register.

## Benefits
- Clearer UX: login page no longer suggests self-registration is available post-setup.
- Correct routing on fresh installs: users land on the registration page instead of a login page they can't use.
This commit is contained in:
gorkem-bwl committed 2026-04-20 13:50:36 -04:00
1 parent 247308b636
commit 4998fe4c94
4 files changed
+44 -16

No files matched your search

+1
View File
@@ -343,6 +343,7 @@
"register": {
"title": "Welcome back to Checkmate!",
"subtitle": "Sign up to get started",
"setupNotice": "This page is only available during initial setup. Once a super admin is registered, additional users can be invited from team settings.",
"submit": "Register"
},
"forgotPassword": {