Package-level declarations

Types

Link copied to clipboard
interface AnonymousAuth

Authentication operations for anonymous sessions.

Link copied to clipboard

Provider-agnostic authentication repository combining AuthStateProvider, AnonymousAuth, EmailPasswordAuth, and SocialAuth. Bridge this to Firebase Auth, Supabase Auth, or any other auth backend.

Link copied to clipboard
data class AuthSessionHint(val hasAccount: Boolean)

A small persisted hint about the last known session, so a cold-start UI can render optimistically.

Link copied to clipboard
class AuthSessionInitializer(authRepository: AuthStateProvider, authTokenProvider: AuthTokenProvider, sessionStore: AuthSessionStore, logger: KommonLogger = NoOpLogger, scope: CoroutineScope = CoroutineScope(SupervisorJob() + Dispatchers.Default))

Warms the auth session at cold start: mints/refreshes a token before the first API request can race an unauthenticated call, then keeps sessionStore updated as AuthStateProvider.authStateFlow changes. Call start early in app startup and stop when its owning app scope is torn down.

Link copied to clipboard

Persists AuthSessionHint across app launches (typically backed by encrypted SharedPreferences).

Link copied to clipboard

Provides access to the current authentication state and account lifecycle operations.

Link copied to clipboard

Supplies the bearer token attached to every outgoing API request.

Link copied to clipboard
data class AuthUser(val uid: String, val isAnonymous: Boolean, val displayName: String? = null, val email: String? = null)

Provider-agnostic authenticated user shape.

Link copied to clipboard

Authentication operations using email and password, or email sign-in links.

Link copied to clipboard
interface SocialAuth

Federated / third-party identity provider sign-in operations.

Functions

Link copied to clipboard
fun Throwable.authSignInErrorMessage(providerName: String, genericFailureMessage: String = "Sign in failed. Please try again."): String

Maps a sign-in failure to a short, user-facing message.