Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/web/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { Settings } from './pages/Settings';
import { Admin } from './pages/Admin';
import { Backend } from './pages/Backend';
import { Signin } from './pages/Signin';
import { Signup } from './pages/Signup';
import { ForgotPassword } from './pages/ForgotPassword';
import { ResetPassword } from './pages/ResetPassword';
import { InteractiveGraphVisualization } from './components/InteractiveGraphVisualization';
Expand Down Expand Up @@ -86,7 +85,9 @@ function AuthenticatedApp() {
<Routes>
<Route path="/" element={<Signin />} />
<Route path="/login" element={<Signin />} />
<Route path="/signup" element={<Signup />} />
{/* Passwordless: signing up and signing in are the same action (email → link →
account, new or returning). /signup opens the magic-link flow directly. */}
<Route path="/signup" element={<Signin initialMagicLink />} />
<Route path="/forgot-password" element={<ForgotPassword />} />
<Route path="/reset-password" element={<ResetPassword />} />
<Route path="*" element={<Navigate to="/" replace />} />
Expand Down
7 changes: 5 additions & 2 deletions packages/web/src/pages/Signin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const GET_SYSTEM_SETTINGS = gql`
}
`;

export function Signin() {
export function Signin({ initialMagicLink = false }: { initialMagicLink?: boolean } = {}) {
const navigate = useNavigate();
const { login: setAuthUser } = useAuth();
const [searchParams] = useSearchParams();
Expand All @@ -93,7 +93,7 @@ export function Signin() {
const [magicLinkCaptchaPayload, setMagicLinkCaptchaPayload] = useState<string | null>(null);

const [showPassword, setShowPassword] = useState(false);
const [useMagicLink, setUseMagicLink] = useState(false);
const [useMagicLink, setUseMagicLink] = useState(initialMagicLink);
const [magicLinkSent, setMagicLinkSent] = useState(false);
const [magicLinkLoading, setMagicLinkLoading] = useState(false);
const [errors, setErrors] = useState<Record<string, string>>({});
Expand Down Expand Up @@ -582,6 +582,9 @@ export function Signin() {
<p className="text-xs text-teal-300/60 text-center">
📂 Don't see it? Check your spam folder after 3 minutes
</p>
<p className="text-xs text-teal-300/80 text-center font-medium">
✅ Once you click it you'll stay signed in on this device — no need to log in again
</p>
</div>

<div className="pt-4 border-t border-teal-500/20 space-y-2">
Expand Down
Loading
Loading