Data Layer low complexity mobile
0
Dependencies
0
Dependents
2
Entities
0
Integrations

Description

Data access abstraction that wraps all Supabase Auth API calls behind a clean interface, decoupling the service layer from the specific provider implementation. Handles secure token storage using Supabase's built-in secure storage, session refresh, and error propagation. Designed to allow future swapping of the identity provider without changes to upstream layers.

Feature: Email & Password Login

auth-repository

Responsibilities

  • Execute email/password sign-in against Supabase Auth API
  • Trigger password reset email via Supabase Auth API
  • Verify OTP/magic-link tokens and exchange for session
  • Persist and retrieve auth session tokens using secure storage
  • Expose stream of auth state changes for BLoC reactivity

Interfaces

signInWithEmailPassword(email, password)
sendPasswordResetEmail(email)
verifyOtp(token, type)
updatePassword(newPassword)
signOut()
getSession()
refreshSession()
onAuthStateChange()
getUserId()

Related Data Entities (2)

Data entities managed by this component