AuthCredential

sealed interface AuthCredential

A credential obtained from an identity provider, ready to be exchanged for a session by an AuthProviderBackend.

Inheritors

Types

Link copied to clipboard
data class IdToken(val providerId: String, val idToken: String, val accessToken: String? = null, val rawNonce: String? = null) : AuthCredential

Token-based credential: the provider flow already ran on-device and produced an ID token (e.g. Google Sign-In, Sign in with Apple, Facebook Limited Login).

Link copied to clipboard
data class OAuthWebFlow(val providerId: String, val scopes: List<String> = emptyList(), val customParameters: Map<String, String> = emptyMap()) : AuthCredential

Web-flow credential: the backend itself must drive an OAuth web flow for providerId (e.g. GitHub via Firebase's OAuthProvider).

Properties

Link copied to clipboard
abstract val providerId: String

Identity provider that issued this credential — one of AuthProviderIds or a custom OAuth provider id.