Weekly Planner
Features

Auth

Magic-code login, guest sessions, and in-place email upgrade.

Auth

Magic code

Hook: useMagicCodeAuth.

  1. db.auth.sendMagicCode({ email })
  2. User enters 6 digits (CodeInputs / Base UI OTP)
  3. db.auth.signInWithMagicCode({ email, code })

Edge cases:

  • Verify only when length is exactly 6
  • submitting ref blocks concurrent verifies
  • Failures clear the code and trigger shake animation

Screens: Login.jsx, UpgradeDialog.jsx.

Guests

Landing GuestButtondb.auth.signInAsGuest(), then navigate to / when needed (e.g. from /home). Errors toast via global Toaster. Signed-in visitors on /home see “시간표 열기” instead of guest/login CTAs.

Guest users get a real Instant workspace. Upgrade dialog converts the guest to an email identity in place (Instant links the account; no local data migration).

Theme before auth

Landing uses local theme state because Instant settings are unavailable. After sign-in, useTheme takes over synced settings.

On this page