OAuthProvider

@Serializable(with = OAuthProviderSerializer::class)
data class OAuthProvider

Value representing an OAuth provider strategy for authentication.

Each OAuth provider corresponds to a third-party authentication service that users can use to sign in to your application. Built-in providers are available as constants, while custom providers retain their complete strategy string so it can be sent to Clerk without losing the provider key.

Supported Providers

The type includes support for major OAuth providers such as:

  • Social platforms: Facebook, Google, Twitter, Instagram, TikTok, Discord

  • Professional platforms: LinkedIn, Microsoft, Slack

  • Developer platforms: GitHub, GitLab, Bitbucket, Atlassian, Vercel

  • Business platforms: HubSpot, Notion, Dropbox, Box, Xero

  • Entertainment platforms: Spotify, Twitch

  • AI platforms: Hugging Face

  • Custom providers: For enterprise or specialized OAuth implementations

Usage

OAuth providers are typically used when configuring sign-in flows or when processing authentication redirects from external services.

Example usage:

// Use with sign-in authentication
SignIn.authenticateWithRedirect(
AuthenticateWithRedirectParams.OAuth(strategy = OAuthProvider.GOOGLE)
)

// Convert from strategy string
val provider = OAuthProvider.fromStrategy("oauth_github")
val customProvider = OAuthProvider.custom("oauth_custom_patreon")

See also

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Extension property to get the logo URL for the OAuth provider.

Link copied to clipboard

Enum-style constant name retained for source compatibility.

Link copied to clipboard

Extension property to get the human-readable name of the OAuth provider.

Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
open override fun toString(): String