Skip to content

Commit 3dac7df

Browse files
authored
Merge pull request #1005 from Web3Auth/update-agg-verifier
Add Comprehensive Login Compatibility Documentation for Aggregate Verifier
2 parents 85506d5 + f0203af commit 3dac7df

File tree

1 file changed

+117
-13
lines changed

1 file changed

+117
-13
lines changed

docs/auth-provider-setup/aggregate-verifier.mdx

Lines changed: 117 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ Developers can create an `Aggregate Multiple Provider` verifier from the Web3Aut
1313
combining multiple login methods. This enables them to create a verifier that retrieves the same
1414
address for their user, regardless of the login providers used. For example, developers can combine
1515
a `Google` and `Email Passwordless` login, or a `Google` and `GitHub` login via Auth0, to access the
16-
same address for their user. These login methods should share the same Verifier ID, such as `email`,
17-
which is unique to the user regardless of the login method used, resulting in the same address for
18-
the user.
16+
same address for their user.
1917

2018
:::note
2119

@@ -26,7 +24,80 @@ You can utilize this feature for projects on `sapphire_devnet` network for free.
2624

2725
:::
2826

29-
### Set up an Aggregate Verifier
27+
## Understanding Login Combinations
28+
29+
Before setting up an aggregate verifier, it's important to understand which login methods can be
30+
combined. The following table shows all possible combinations of login providers.
31+
32+
:::tip Understanding the Table
33+
34+
- **Rows**: First sub-verifier chosen during aggregate verifier creation
35+
- **Columns**: Available options for the second sub-verifier
36+
- ✅ = Supported combination
37+
- ❌ = Unsupported combination
38+
39+
:::
40+
41+
| First Sub-Verifier | Google | Facebook | Twitch | Discord | Auth0 | Email Passwordless | SMS Passwordless |
42+
| :----------------- | :----: | :------: | :----: | :-----: | :---: | :----------------: | :--------------: |
43+
| **Google** ||||||||
44+
| **Facebook** ||||||||
45+
| **Twitch** ||||||||
46+
| **Discord** ||||||||
47+
| **Email P'less** ||||||||
48+
| **SMS P'less** ||||||||
49+
| **Auth0** ||||||||
50+
51+
:::info Important
52+
53+
Some login methods (like Twitch and Discord) cannot be combined with others because they lack a
54+
**common identifier**, such as an email. This identifier is crucial for connecting user accounts
55+
across different authentication methods and ensuring reliable user recognition when switching
56+
between login methods.
57+
58+
:::
59+
60+
### Auth0 Special Capabilities
61+
62+
When using Auth0 as a verifier, you have access to a wide range of authentication methods. After
63+
selecting Auth0, you can choose from the following **Authentication Types**:
64+
65+
<div className="auth0-options-grid">
66+
<div>
67+
68+
#### Social Logins
69+
70+
- Google
71+
- Twitter
72+
- Reddit
73+
- Apple
74+
- GitHub
75+
- LinkedIn
76+
77+
</div>
78+
<div>
79+
80+
#### Regional Options
81+
82+
- WeChat
83+
- Weibo
84+
- Kakao
85+
- Line
86+
87+
</div>
88+
<div>
89+
90+
#### Other Methods
91+
92+
- Email Passwordless
93+
- Email Password
94+
- Custom Authentication
95+
- Additional Options
96+
97+
</div>
98+
</div>
99+
100+
## Setting up an Aggregate Verifier
30101

31102
<CreateVerifierFirstStep />
32103

@@ -35,8 +106,10 @@ You can utilize this feature for projects on `sapphire_devnet` network for free.
35106

36107
1. Select `Aggregate Multiple Providers` as the Login provider.
37108
![Login Providers list on Web3Auth Dashboard](/images/dashboard/create-verifier-aggregate.png)
109+
38110
1. Click on `Add Sub Verifiers` to add a new sub-verifier.
39111
![Add first sub-verifier on Web3Auth Dashboard](/images/dashboard/create-verifier-aggregate-add-sub.png)
112+
40113
1. Select any social login provider from the list to start with. Here we're selecting `Google`.
41114

42115
Paste the **Client ID** from the Google App to the `Client ID` field and click on
@@ -47,20 +120,17 @@ You can utilize this feature for projects on `sapphire_devnet` network for free.
47120

48121
1. This time, you can select Social Login Providers like `Auth0` or `Google`, or `Custom Providers`
49122
from the dropdown list. We're selecting `Auth0` in this example.
50-
51123
![Auth0 as sub verifier on Web3Auth Dashboard](/images/dashboard/create-verifier-aggregate-add-second-sub.png)
52124

53-
_Note: You can combine two or more Google logins as needed for web and mobile apps._
125+
:::note You can combine two or more Google logins as needed for web and mobile apps. :::
54126

55127
1. Select the `Authentication Type` based on your application need from the dropdown. We're
56128
selecting `GitHub` in this example.
57-
58129
![Create Aggregate Verifiier on Web3Auth Dashboard](/images/dashboard/create-verifier-aggregate-auth0-github.png)
59130

60131
1. Next, select `Email` as the **JWT Verifier ID** and enter the `Auth0 Client ID` and
61132
`Auth0 Domain` from your Auth0 application. See how to create a new Auth0 application
62133
[here](https://auth0.com/docs/quickstart/webapp/).
63-
64134
![Create GitHub Sub Verifiier on Web3Auth Dashboard](/images/dashboard/create-verifier-aggregate-auth0-github-filled.png)
65135
![Domain and Client ID from Auth0 Dashboard](/dashboard/verifiers/aggregate-verifier/av-a0-github.png)
66136

@@ -77,21 +147,20 @@ You can utilize this feature for projects on `sapphire_devnet` network for free.
77147

78148
1. Similarly, create a third sub-verifier for `Email Passwordless`. Click on `Social Login Provider`
79149
and then select `Email Passwordless` as the Login provider from the dropdown list
80-
81150
![Create Email Passwordless Sub Verifiier on Web3Auth Dashboard](/images/dashboard/create-verifier-aggregate-email-passwordless.png)
82151

83152
1. Finally, click on `Create` to deploy the verifier.
84153

85154
It typically takes 5-10 minutes for the verifier to go live. Once deployed & live, you'll receive
86155
an email and the dashboard will display the 'Live' status for the verifier.
87156

88-
:::note NOTE
157+
:::note
89158

90159
You can aggregate two or more verifiers.
91160

92161
:::
93162

94-
### Example
163+
## Implementation Example
95164

96165
```tsx
97166
import { Web3AuthNoModal } from "@web3auth/no-modal";
@@ -100,8 +169,7 @@ import { EthereumPrivateKeyProvider } from "@web3auth/ethereum-provider";
100169
import { CHAIN_NAMESPACES } from "@web3auth/base";
101170

102171
const clientId =
103-
"BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ";
104-
// get it from https://dashboard.web3auth.io by creating a Plug n Play project.
172+
"BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ"; // get it from https://dashboard.web3auth.io by creating a Plug n Play project.
105173

106174
const chainConfig = {
107175
chainNamespace: CHAIN_NAMESPACES.EIP155,
@@ -187,3 +255,39 @@ Check out the
187255
[**full example on GitHub**](https://github.com/Web3Auth/web3auth-pnp-examples/tree/main/web-no-modal-sdk/custom-authentication/aggregate-verifier-examples/auth0-google-aggregate-no-modal-example).
188256

189257
:::
258+
259+
<style>
260+
{`
261+
.auth0-options-grid {
262+
display: grid;
263+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
264+
gap: 20px;
265+
margin: 20px 0;
266+
}
267+
268+
table {
269+
display: table;
270+
width: 100%;
271+
margin: 1em 0;
272+
overflow-x: auto;
273+
}
274+
275+
th {
276+
background: var(--ifm-color-primary);
277+
color: white;
278+
font-weight: 600;
279+
padding: 12px;
280+
text-align: center;
281+
}
282+
283+
td {
284+
padding: 12px;
285+
text-align: center;
286+
border: 1px solid var(--ifm-color-gray-300);
287+
}
288+
289+
tr:nth-child(even) {
290+
background: var(--ifm-color-gray-100);
291+
}
292+
`}
293+
</style>

0 commit comments

Comments
 (0)