Setup
- Enable providers in Dynamic Dashboard → Social
- Whitelist your deep link URL in Security → Whitelist Mobile Deeplink
- Add OAuth callback activity to
AndroidManifest.xml:
AndroidManifest.xml
Implementation
Social Login with Providers
Use thesdk.auth.social.connect() method to authenticate with social providers:
Supported Providers
The SDK supports the following social providers:| Provider | Enum Value |
|---|---|
SocialAuthModule.SocialProvider.GOOGLE | |
| Apple | SocialAuthModule.SocialProvider.APPLE |
| Farcaster | SocialAuthModule.SocialProvider.FARCASTER |
| Discord | SocialAuthModule.SocialProvider.DISCORD |
SocialAuthModule.SocialProvider.TWITTER | |
SocialAuthModule.SocialProvider.FACEBOOK | |
| GitHub | SocialAuthModule.SocialProvider.GITHUB |
Complete Social Authentication Example
Here’s a complete example showing how to implement social authentication in Jetpack Compose:Listening for Authentication State
After social authentication succeeds, use Kotlin Flow to handle the authenticated user:Best Practices
1. Deep Link URL Management
- Use a consistent deep link URL format
- Ensure the URL is whitelisted in your Dynamic dashboard
- Test deep link handling in your app
- Make sure the
redirectUrlinClientPropsmatches your URL scheme
2. User Experience
- Show loading states during authentication
- Provide clear error messages
- Handle user cancellation gracefully
- Display provider-specific branding appropriately
3. Security
- Never store sensitive authentication data
- Use secure network connections
- Implement proper session management
- Follow provider-specific security guidelines
Troubleshooting
Callback Not Working
- Verify your app’s URL scheme is configured correctly in
AndroidManifest.xml - Check that the
redirectUrlinClientPropsmatches your URL scheme - Ensure your deep link URL is whitelisted in Dynamic dashboard under Security → Whitelist Mobile Deeplink
- Verify the
AuthCallbackActivityis properly configured in your manifest
Provider Not Working
- Confirm provider is enabled in Dynamic dashboard
- Check that OAuth settings are properly configured
- Verify you have the correct permissions/scopes configured
- Test with a different account to rule out account-specific issues
Authentication Fails
- Check network connectivity
- Verify provider credentials in Dynamic dashboard
- Ensure the user’s account with the provider is valid
- Check for any error messages in Logcat
- Verify the provider app is installed (for Apple, Google, etc.)
Advanced: Custom Social Button UI
Create custom-styled social login buttons:What’s Next
Now that you have social authentication set up:- Session Management - Manage authenticated sessions
- Wallet Operations - Work with user wallets
- MFA - Add multi-factor authentication
- Passkeys - Implement passwordless authentication