KMPAuthBackend

Process-wide registry for the active AuthProviderBackend.

kmpauth-firebase registers its backend automatically the first time a Firebase container is used; a Supabase (or custom) backend should call register once at application start. The first registration wins unless replace is set — this keeps a lazily self-registering default from overriding an explicitly chosen backend.

Functions

Link copied to clipboard

The active backend, or null if none has been registered yet.

Link copied to clipboard
fun register(backend: AuthProviderBackend, replace: Boolean = false)

Registers backend as the process-wide auth backend.

Link copied to clipboard

The active backend, or an IllegalStateException failure explaining how to register one.