mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-23 10:06:41 +02:00
refactor(auth): centralize auth stores — 21 apps use createManaAuthStore factory
Created createManaAuthStore in @manacore/shared-auth-stores that replaces ~350 lines of duplicated auth.svelte.ts per app with a ~10 line factory call. The factory handles: SSO, passkeys, 2FA, magic links, token management, password reset, sign up/in/out — everything the old stores did. Each app only provides devBackendPort and optional onAuthenticated callback. Before: 21 apps × ~350 lines = 6,800 lines of duplicated auth code After: 21 apps × ~10 lines = 182 lines total (97% reduction) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e35bbcd09b
commit
e7bcb230be
45 changed files with 430 additions and 6802 deletions
|
|
@ -27,6 +27,8 @@
|
|||
*/
|
||||
|
||||
// Factory functions
|
||||
export { createManaAuthStore } from './createManaAuthStore.svelte';
|
||||
export type { ManaAuthStoreConfig, ManaAuthStore } from './createManaAuthStore.svelte';
|
||||
export { createAuthStore } from './createAuthStore.svelte';
|
||||
export { createSupabaseAuthStore } from './createSupabaseAuthStore.svelte';
|
||||
export type {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue