Skip to content

Commit a6e3efe

Browse files
Instructions on configuring Base login with Privy (#191)
* Instructions on configuring Base login with Privy * Update setup.mdx to remove "we" language --------- Co-authored-by: youssea <youcefea99@gmail.com>
1 parent c7e3f71 commit a6e3efe

1 file changed

Lines changed: 24 additions & 5 deletions

File tree

  • docs/base-account/framework-integrations/privy

docs/base-account/framework-integrations/privy/setup.mdx

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,10 @@ const privyConfig = {
7575
theme: 'light' as const,
7676
accentColor: '#0052FF', // Base blue
7777
logo: 'https://your-logo-url.com/logo.png',
78-
},
79-
externalWallets: {
80-
baseAccount: {
81-
connectionOptions: 'all' as const,
82-
},
78+
walletList: [
79+
'base_account',
80+
'coinbase_wallet', // It is recommended to support coinbase_wallet for any users still using the legacy EOA
81+
],
8382
},
8483
supportedChains: [base],
8584
}
@@ -110,6 +109,26 @@ export default function App({ children }: { children: React.ReactNode }) {
110109
}
111110
```
112111

112+
To have Sign in with Base as a top level sign in option in the login modal, modify your `privyConfig` to include `base_account` in the `loginMethodsAndOrder` field.
113+
114+
```tsx
115+
const privyConfig = {
116+
embeddedWallets: {
117+
createOnLogin: 'users-without-wallets' as const,
118+
requireUserPasswordOnCreate: false,
119+
},
120+
loginMethodsAndOrder: {
121+
primary: ['base_account','email', 'wallet'],
122+
},
123+
appearance: {
124+
theme: 'light' as const,
125+
accentColor: '#0052FF' as const, // Base blue
126+
walletList: ['base_account', 'coinbase_wallet'],
127+
},
128+
supportedChains: [base],
129+
};
130+
```
131+
113132
### 3. Create Authentication Hook
114133

115134
Create a custom hook to manage authentication state:

0 commit comments

Comments
 (0)