Overview
The Third Party (Social Login) recipe provides APIs for authenticating users through external OAuth providers like Google, Facebook, GitHub, and other social login platforms.Key Features
- Social Sign In/Up: Single endpoint for both signing in existing users and signing up new users
- Provider Agnostic: Works with any OAuth 2.0 or OpenID Connect provider
- Email Verification: Supports automatic email verification based on provider trust
- Multi-tenancy: Full support for tenant-specific social login configurations
- Account Linking: Automatic linking of social accounts with existing users
Available Endpoints
Sign In/Up
Authenticate users with third-party providers
Provider Configuration
Manage third-party provider settings
Common Use Cases
Social Login Flow
- User initiates login with a social provider (e.g., Google)
- Your application exchanges the authorization code for user info
- Call the
/recipe/signinupendpoint with provider details - SuperTokens creates or updates the user account
- Session is created for the authenticated user
Provider Configuration
Third-party providers can be configured at the tenant level, allowing different social login options for different tenants in a multi-tenant setup.Authentication
All Third Party APIs require an API key for authentication. Include the API key in the request headers:Multi-tenancy Support
The Third Party recipe is tenant-aware. You can:- Configure different social providers per tenant
- Enable/disable social login for specific tenants
- Maintain separate user pools per tenant
Error Handling
Common error responses:EMAIL_CHANGE_NOT_ALLOWED_ERROR: User’s email cannot be changed due to account linking constraintsUNKNOWN_USER_ID_ERROR: The specified user ID was not foundUNKNOWN_THIRD_PARTY_USER_ERROR: No user found with the given third-party credentials
Related APIs
- Session Management - Create and manage user sessions after authentication
- Email Verification - Verify user email addresses
- User Management - Manage authenticated users
Next Steps
Sign In/Up Endpoint
Learn how to implement social login
Provider Configuration
Configure social login providers