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")