Skip to content

Commit a90f6bc

Browse files
authored
Merge pull request WalletConnect#1661 from WalletConnect/feat/farcaster-2
Add farcaster references
2 parents 90639fd + 6fd62c3 commit a90f6bc

File tree

3 files changed

+38
-33
lines changed

3 files changed

+38
-33
lines changed

docs/appkit/features/socials.mdx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ import flutterLogo from '../../../static/assets/home/flutterLogo.png'
1111

1212
# Email & Socials
1313

14-
Bring your app to a world of new users in minutes with Email and Social login, giving both new and existing users the ability to seamlessly connect to your app using just an email address or social account. Set up with just one line of code and enable Smart Account functionality in minutes.
14+
Bring your app to a world of new users in minutes with Email and Social login, giving both new and existing users the ability to seamlessly connect to your app using just an email address or social account. Set up with just one line of code and enable Smart Account functionality in minutes.
1515

16-
AppKit supports the following providers:
17-
- **Email**, **Google**, **X**, **GitHub**, **Discord** and **Apple**.
16+
AppKit supports the following providers:
17+
18+
- **Email**, **Google**, **X**, **GitHub**, **Discord**, **Apple**, **Facebook** and **Farcaster**.
1819

1920
<Button name="Try Demo" url="https://lab.web3modal.com/library/wagmi/" />
2021

@@ -68,4 +69,4 @@ AppKit supports the following providers:
6869
href: '../flutter/onboarding/email'
6970
}
7071
]}
71-
/>
72+
/>

docs/appkit/react/core/custom-connectors.mdx

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ import PlatformTabs from '../../../components/PlatformTabs'
22
import PlatformTabItem from '../../../components/PlatformTabItem'
33

44
# Custom connectors
5+
56
Custom connectors, such as social logins, WalletConnect QR, Coinbasewallet, etc., can be integrated into your Modal. A simple example of how to incorporate them for Wagmi or Ethers library.
7+
68
<PlatformTabs groupId="eth-lib" activeOptions={["wagmi", "ethers"]}>
79
<PlatformTabItem value="wagmi">
810

@@ -27,20 +29,24 @@ const metadata = {
2729

2830
// create the connectors (delete the ones you don't need)
2931
const connectors: CreateConnectorFn[] = []
30-
connectors.push(walletConnect({ projectId, metadata, showQrModal: false })); // showQrModal must be false
31-
connectors.push(injected({ shimDisconnect: true }));
32-
connectors.push(coinbaseWallet({
33-
appName: metadata.name,
34-
appLogoUrl: metadata.icons[0],
35-
}));
36-
37-
connectors.push(authConnector({
38-
options: { projectId },
39-
socials: ['google', 'x', 'github', 'discord', 'apple'], // add Social logins
40-
showWallets: true,
41-
email: true,
42-
walletFeatures: false,
43-
}));
32+
connectors.push(walletConnect({ projectId, metadata, showQrModal: false })) // showQrModal must be false
33+
connectors.push(injected({ shimDisconnect: true }))
34+
connectors.push(
35+
coinbaseWallet({
36+
appName: metadata.name,
37+
appLogoUrl: metadata.icons[0]
38+
})
39+
)
40+
41+
connectors.push(
42+
authConnector({
43+
options: { projectId },
44+
socials: ['google', 'x', 'github', 'discord', 'apple', 'facebook', 'farcaster'], // add Social logins
45+
showWallets: true,
46+
email: true,
47+
walletFeatures: false
48+
})
49+
)
4450

4551
const config = createConfig({
4652
chains: [sepolia],
@@ -52,7 +58,7 @@ const config = createConfig({
5258

5359
createWeb3Modal({
5460
wagmiConfig: config,
55-
projectId,
61+
projectId
5662
})
5763

5864
export function ContextProvider({ children }) {
@@ -62,10 +68,9 @@ export function ContextProvider({ children }) {
6268
</WagmiProvider>
6369
)
6470
}
65-
6671
```
67-
Check our React Wagmi demo in [Github](https://github.com/WalletConnect/web-examples/tree/main/dapps/web3modal/react)
6872

73+
Check our React Wagmi demo in [Github](https://github.com/WalletConnect/web-examples/tree/main/dapps/web3modal/react)
6974

7075
</PlatformTabItem>
7176
<PlatformTabItem value="ethers">
@@ -102,7 +107,7 @@ const ethersConfig = defaultConfig({
102107
defaultChainId: 1, // used for the Coinbase SDK
103108
auth: {
104109
email: true,
105-
socials: ['google', 'x', 'github', 'discord', 'apple'], // add social logins
110+
socials: ['google', 'x', 'github', 'discord', 'apple', 'facebook', 'farcaster'], // add social logins
106111
showWallets: true,
107112
walletFeatures: false
108113
}
@@ -113,19 +118,18 @@ createWeb3Modal({
113118
ethersConfig,
114119
chains: [mainnet],
115120
projectId,
116-
enableAnalytics: true, // Optional - defaults to your Cloud configuration
121+
enableAnalytics: true // Optional - defaults to your Cloud configuration
117122
})
118123

119-
120-
// Now, you can render connect button
121-
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
124+
// Now, you can render connect button
125+
ReactDOM.createRoot(document.getElementById('root') as HTMLElement).render(
122126
<React.StrictMode>
123-
<w3m-button />
127+
<w3m-button />
124128
</React.StrictMode>
125-
);
129+
)
126130
```
127131

128132
Check our React ethers demo in [Github](https://github.com/WalletConnect/web-examples/tree/main/dapps/web3modal/react-ethers)
129133

130134
</PlatformTabItem>
131-
</PlatformTabs>
135+
</PlatformTabs>

docs/appkit/shared/socials.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const wagmiConfig = defaultWagmiConfig({
1414
/* highlight-add-start */
1515
auth: {
1616
email: true, // default to true
17-
socials: ['google', 'x', 'github', 'discord', 'apple'],
17+
socials: ['google', 'x', 'github', 'discord', 'apple', 'facebook', 'farcaster'],
1818
showWallets: true, // default to true
1919
walletFeatures: true // default to true
2020
}
@@ -43,7 +43,7 @@ const wagmiConfig = createConfig({
4343
options: { projectId },
4444
/* highlight-add-start */
4545
email: true, // default to true
46-
socials: ['google', 'x', 'github', 'discord', 'apple'],
46+
socials: ['google', 'x', 'github', 'discord', 'apple', 'facebook', 'farcaster'],
4747
showWallets: true, // default to true
4848
walletFeatures: true // default to true
4949
/* highlight-add-end */
@@ -63,7 +63,7 @@ const modal = createWeb3Modal({
6363
/* highlight-add-start */
6464
auth: {
6565
email: true, // default to true
66-
socials: ['google', 'x', 'github', 'discord', 'apple'],
66+
socials: ['google', 'x', 'github', 'discord', 'apple', 'facebook', 'farcaster'],
6767
showWallets: true, // default to true
6868
walletFeatures: true // default to true
6969
}
@@ -79,7 +79,7 @@ const modal = createWeb3Modal({
7979
## Options
8080

8181
- email [boolean]: This boolean defines whether you want to enable email login. Default `true`
82-
- socials [array]: This array contains the list of social platforms that you want to enable for user authentication. The platforms in the example include Google, X, GitHub, Discord, Apple and Facebook (coming soon). Default `undefined`
82+
- socials [array]: This array contains the list of social platforms that you want to enable for user authentication. The platforms in the example include Google, X, GitHub, Discord, Apple, Facebook and Farcaster. Default `undefined`
8383
- showWallets [boolean]: This boolean defines whether you want to show the wallet options on the first connect screen. If this is false and `socials` are enabled, it will show a button that directs you to a new screen displaying the wallet options. Default `true`
8484
- walletFeatures [boolean]: This boolean defines whether you want to enable wallet features. Wallet features allow users to view their balance, send, receive, and buy funds through a clear user interface. Default `true`
8585

0 commit comments

Comments
 (0)