You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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>
Copy file name to clipboardExpand all lines: docs/base-account/framework-integrations/privy/setup.mdx
+24-5Lines changed: 24 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,11 +75,10 @@ const privyConfig = {
75
75
theme: 'light'asconst,
76
76
accentColor: '#0052FF', // Base blue
77
77
logo: 'https://your-logo-url.com/logo.png',
78
-
},
79
-
externalWallets: {
80
-
baseAccount: {
81
-
connectionOptions: 'all'asconst,
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
+
],
83
82
},
84
83
supportedChains: [base],
85
84
}
@@ -110,6 +109,26 @@ export default function App({ children }: { children: React.ReactNode }) {
110
109
}
111
110
```
112
111
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'asconst,
118
+
requireUserPasswordOnCreate: false,
119
+
},
120
+
loginMethodsAndOrder: {
121
+
primary: ['base_account','email', 'wallet'],
122
+
},
123
+
appearance: {
124
+
theme: 'light'asconst,
125
+
accentColor: '#0052FF'asconst, // Base blue
126
+
walletList: ['base_account', 'coinbase_wallet'],
127
+
},
128
+
supportedChains: [base],
129
+
};
130
+
```
131
+
113
132
### 3. Create Authentication Hook
114
133
115
134
Create a custom hook to manage authentication state:
0 commit comments