Appearance
Configuring login methods ​
Privy supports a variety of login methods for your app, including email, phone, wallet, Google, Apple, Twitter, Discord, GitHub, LinkedIn, TikTok, and Farcaster.
Users can either use these account types as their upfront login method, or can link them to their profile after logging in via a different method.
You can easily configure the login methods you'd like per the instructions below!
1. Configure allowed login methods in the Dashboard ​
To configure login methods for your app, first, go to the Privy Dashboard and select your desired app from the dropdown. Then, navigate to the Login Methods page.
In the Login Methods page, enable all account types that you'd like users to be able to login with or link to their profile in your app. You can select from basics (email, sms, wallets) and social login methods. Privy will automatically reject any attempts to login with or link an account type that is not enabled within this page.
Privy tip
As your integration gets closer to getting into production, make sure to also configure your own OAuth credentials for your social login methods! See this guide for more.
By default, only email and wallet logins will be enabled for new apps; you can always update these!
2. Configure upfront login methods in the SDK ​
The login methods you enable in the Privy Dashboard should contain all of the account types that users are allowed to login with or link in your app. You can choose a subset (or all) of these account types as upfront login methods shown to users when they first login to your app.
TIP
Passkeys as a login method must be enabled in the developer dashboard. Users can only log in with a passkey if they have linked it to an existing account. Account creation via passkeys is not supported.
To configure which of your allowed login methods are presented to users in the upfront login modal, pass in an array of your desired account types to the config.loginMethods
property of the PrivyProvider
:
tsx
<PrivyProvider
appId='your-privy-app-id'
config={{
// Configures email, wallet, Google, Apple, and Farcaster login
loginMethods: ['email', 'wallet', 'google', 'apple', 'farcaster']
...insertTheRestOfYourPrivyProviderConfig
}}
>
{children}
</PrivyProvider>
You can also configure which login methods to show at runtime, by passing in loginMethods
to the login
method:
tsx
import {usePrivy} from '@privy-io/react-auth';
const {login} = usePrivy();
<button onClick={() => login({loginMethods: ['email', 'sms']})}>
Login with email and sms only
</button>;
The supported loginMethods
are 'email'
, 'sms'
, 'wallet'
, 'google'
, 'apple'
, 'twitter'
, 'discord'
, 'github'
, 'linkedin'
, 'spotify'
, 'instagram'
, 'telegram'
, 'tiktok'
, and 'farcaster'
.
TIP
The account types you include in the config.loginMethods
array must be a subset of the login methods you enable for your app in the Dashboard.