OAuth Social Logins
Add social login options to your Capsule integration
Overview
Capsule supports various OAuth methods to authenticate users across different platforms. Currently supported platforms include Google, Facebook, Discord, Twitter, and Apple.
Capsule automatically links wallets with a common email identifier to avoid creating duplicate wallets if users choose different methods in different sessions. Because of this, users must have an email associated with their login account of choice. Without an email linked to the account, authentication will fail and the user will see a prompt to either add email to their social account or try a different method.
Integrating Social Logins
Capsule Modal
Social Logins can be easily integrated via the CapsuleModal
Component by passing the desired
options as an array to the oAuthMethods
property as follows:
Custom UI Entrypoint
For developers preferring manual control over launching an authentication process or leveraging a custom implementation, the following can be used to obtain OAuth URLs:
Beta Testing Email
In the BETA
Environment, you can use any email ending in @test.usecapsule.com
(like dev@test.usecapsule.com). Any OTP code will work for verification with these test emails.
These credentials are for beta testing only. You can delete test users anytime in the beta developer console to free up user slots.
Farcaster OAuth Login
Farcaster Login works similarly to other social logins, with one key difference: there is no email associated with the account. Instead, we use the Farcaster username as the identifier for this user. This is important to keep in mind, as the functions used in the SDK will be different. Here’s an example of implementing Farcaster login:
Was this page helpful?