Skip to content

KSN: add Supabase email/password login#10

Merged
codebend3r merged 5 commits into
mainfrom
login-system
Jul 10, 2026
Merged

KSN: add Supabase email/password login#10
codebend3r merged 5 commits into
mainfrom
login-system

Conversation

@codebend3r

Copy link
Copy Markdown
Owner
  • new Supabase project kasane (us-east-2) as auth backend, email+password with confirmation required
  • src/api/supabase.ts shared client: AsyncStorage session persistence, AppState-gated token refresh on native
  • src/state/auth.ts useAuth zustand store synced via onAuthStateChange; signIn / signUp / signOut return error message or null
  • app/login.tsx sign-in / create-account form with inline errors, busy state, check-your-email state; account view + sign out when signed in
  • GlobalHeader account pill → /login (Sign in signed out, email initial signed in)
  • jest moduleNameMapper for @/* alias; auth store covered in src/state/auth.test.ts
  • verified live: bad credentials round-trip surfaces Invalid login credentials from the real project
  • pending dashboard config: Site URL https://kasane.netlify.app + /login redirect allow-list entry

- `bun add @supabase/supabase-js`
- `src/api/supabase.ts` creates shared client for project `kasane`
- session persisted via `AsyncStorage`, `detectSessionInUrl` off
- `AppState` listener pauses token refresh while backgrounded on native
- `src/state/auth.ts` zustand store: `session` + `status` (`loading` | `signedIn` | `signedOut`)
- seeded from `getSession`, synced via `onAuthStateChange`
- `signIn` / `signUp` / `signOut` wrap SDK, return error message or `null`
- `signUp` redirects confirmation email to `/login` on the web app
- `useAuthStatus` / `useAuthEmail` selector hooks
- jest `moduleNameMapper` for `@/*` alias
- cover store transitions and actions in `src/state/auth.test.ts`
- `app/login.tsx`: email + password form with `signIn` / `signUp` mode toggle
- check-your-email state after signup, inline errors, busy spinner
- signed-in account view shows email + sign out
- register `login` in `_layout.tsx` `Stack`
- pill next to JP/EN toggle navigates to `/login`
- shows `Sign in` signed out, email initial signed in via `useAuthEmail`
@cursor

cursor Bot commented Jul 10, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@netlify

netlify Bot commented Jul 10, 2026

Copy link
Copy Markdown

Deploy Preview for kasane-guide ready!

Name Link
🔨 Latest commit 6c12bb1
🔍 Latest deploy log https://app.netlify.com/projects/kasane-guide/deploys/6a50f8a8171aef0008f69b36
😎 Deploy Preview https://deploy-preview-10--kasane-guide.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

- 7 arcs covering all 11 chapters of Shirow's original manga
- ep 1 of the airing 2026 Science SARU series mapped; chapters-only tail to extend as episodes air
- 2 movies (Oshii '95 film + Innocence)
- anime `177699` → manga `31023`
- register in `src/data/index.ts` `ALL_MAPPINGS`
@cursor

cursor Bot commented Jul 10, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@codebend3r codebend3r merged commit dc016a1 into main Jul 10, 2026
6 checks passed
@codebend3r codebend3r deleted the login-system branch July 10, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant