AuthProviderBackend

Pluggable authentication backend. KMPAuth ships a Firebase implementation (registered automatically by kmpauth-firebase); other backends — e.g. Supabase — implement this interface and register via KMPAuthBackend.register.

Functions

Link copied to clipboard
abstract fun currentUser(): KMPAuthUser?

Currently signed-in user, or null when signed out.

Link copied to clipboard
abstract suspend fun signIn(credential: AuthCredential, linkWithCurrentUser: Boolean = false): Result<KMPAuthUser>

Exchanges credential for a signed-in session.

Link copied to clipboard
abstract suspend fun signOut()

Signs out the current user.