Skip to content

Commit e273bf7

Browse files
update mpc core kit swift docs
2 parents 160585d + 2afb4bb commit e273bf7

File tree

1,889 files changed

+78930
-46394
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,889 files changed

+78930
-46394
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ yarn-error.log*
2222
.integrationBuilderCache
2323

2424
yarn.lock
25+
.idea

.vscode/settings.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"Metamask's",
1818
"metastring",
1919
"nodir",
20-
"openlogin",
2120
"palenight",
2221
"passwordless",
2322
"solana",
@@ -55,10 +54,10 @@
5554
"editor.defaultFormatter": "DotJoshJohnson.xml"
5655
},
5756
"[javascript]": {
58-
"editor.defaultFormatter": "vscode.typescript-language-features"
57+
"editor.defaultFormatter": "esbenp.prettier-vscode"
5958
},
6059
"[typescriptreact]": {
61-
"editor.defaultFormatter": "vscode.typescript-language-features"
60+
"editor.defaultFormatter": "esbenp.prettier-vscode"
6261
},
6362
"[typescript]": {
6463
"editor.defaultFormatter": "esbenp.prettier-vscode"

docs/README.mdx

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Introduction
33
slug: /
44
hide_table_of_contents: true
55
hide_title: true
6-
displayed_sidebar: docs
6+
77
image: "images/docs-meta-cards/documentation-card.png"
88
description: "Introduction | Documentation - Web3Auth"
99
---
@@ -19,24 +19,14 @@ import SEO from "@site/src/components/SEO";
1919

2020
# Web3Auth Documentation
2121

22-
#### Simplifying User Onboarding with Scalable, Secure, Non-Custodial Wallet Management
23-
24-
<HomeQuickStartBanner />
25-
26-
# Discover Our Solutions
27-
28-
Our extensive product suite covers everything from pre-onboarding to post-onboarding and authentication, enabling you to craft a seamless end-to-end
29-
experience for your Web3 dApp.
22+
#### Effortless Social Logins, Beautiful UX, and Secure Onboarding for Web3
3023

3124
<ProductCards />
3225

33-
# Resources
26+
## Resources
3427

35-
Our comprehensive array of guides, reference materials, and examples is designed to assist you at every step of your Web3Auth integration. Explore the
36-
nuances of web3 authentication and craft a tailored integration that meets your specific needs.
28+
Our comprehensive array of guides, reference materials, and examples is designed to assist you at
29+
every step of your Web3Auth integration. Explore the nuances of web3 authentication and craft a
30+
tailored integration that meets your specific needs.
3731

3832
<ResourcesCards />
39-
40-
# Need Help?
41-
42-
<HelpCards />
Lines changed: 191 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,178 @@
11
---
2-
title: Creating Aggregate Verifier on the Web3Auth Dashboard
3-
sidebar_label: Aggregate Verifier
4-
displayed_sidebar: resources
5-
description: "Creating Aggregate Verifier on the Web3Auth Dashboard | Documentation - Web3Auth"
2+
title: Creating Aggregate Verifier on Web3Auth Dashboard
3+
sidebar_label: Aggregate Multiple Logins
4+
description:
5+
"Creating Aggregate Verifier on the Web3Auth Dashboard | Auth Provider Setup | Documentation -
6+
Web3Auth"
67
image: "images/docs-meta-cards/documentation-card.png"
78
---
89

9-
Developers can create `Aggregate Multiple Provider` from the Web3Auth Dashboard by combining multiple login methods to create a verifier to get the
10-
same address for their user regardless of their login providers. For example, combining a `Google` and `Email Passwordless` login or `Google` and
11-
`GitHub` via Auth0 to access the same address for your user. These login methods should share the same Verifier ID, e.g., `email`; Such verifiers are
12-
called `Single ID Verifiers`.
10+
import CreateVerifierFirstStep from "@site/src/common/docs/_create-verifier-first-step.mdx";
1311

14-
### Set up an Aggregate Verifier
12+
Developers can create an `Aggregate Multiple Provider` verifier from the Web3Auth Dashboard by
13+
combining multiple login methods. This enables them to create a verifier that retrieves the same
14+
address for their user, regardless of the login providers used. For example, developers can combine
15+
a `Google` and `Email Passwordless` login, or a `Google` and `GitHub` login via Auth0, to access the
16+
same address for their user.
1517

16-
1. Create an aggregate verifier for your application by selecting `Aggregate Multiple Providers` as the Login provider from the login providers.
18+
:::note
19+
20+
Access to creating a verifier is gated. Therefore, creating an aggregate verifier
21+
[**requires a minimum Growth Plan**](https://web3auth.io/pricing.html).
22+
23+
You can utilize this feature for projects on `sapphire_devnet` network for free.
24+
25+
:::
26+
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
101+
102+
<CreateVerifierFirstStep />
103+
104+
1. Give a unique name to your verifier in the `Verifier Identifier` field. e.g.,
105+
`web3auth-aggregate-verifier`.
106+
107+
1. Select `Aggregate Multiple Providers` as the Login provider.
17108
![Login Providers list on Web3Auth Dashboard](/images/dashboard/create-verifier-aggregate.png)
18-
2. Click on `Add Sub Verifiers` to add a new sub-verifier.
109+
110+
1. Click on `Add Sub Verifiers` to add a new sub-verifier.
19111
![Add first sub-verifier on Web3Auth Dashboard](/images/dashboard/create-verifier-aggregate-add-sub.png)
20-
3. Select any social login provider from the list to start with. Here we're selecting `Google`. Paste the **Client ID** from the Google App to the
21-
`Client ID` field and click on `Add Sub Verifiers`.
112+
113+
1. Select any social login provider from the list to start with. Here we're selecting `Google`.
114+
115+
Paste the **Client ID** from the Google App to the `Client ID` field and click on
116+
`Add Sub Verifiers`.
22117
![Select Google from Login Providers list on Web3Auth Dashboard](/images/dashboard/create-verifier-aggregate-google.png)
23-
4. Next, create the second sub-verifier. Click on `Add Sub Verifiers` to add a new sub-verifier.
24-
5. Select `Auth0` on the dropdown or choose `Custom Providers` from the radio buttons. We're selecting `Auth0` in this example.
118+
119+
1. Next, create the second sub-verifier by clicking on the `Add Sub Verifiers` button.
120+
121+
1. This time, you can select Social Login Providers like `Auth0` or `Google`, or `Custom Providers`
122+
from the dropdown list. We're selecting `Auth0` in this example.
25123
![Auth0 as sub verifier on Web3Auth Dashboard](/images/dashboard/create-verifier-aggregate-add-second-sub.png)
26-
6. Select the `Authentication Type` based on your application need on the dropdown. We're selecting `GitHub` in this example.
124+
125+
:::note You can combine two or more Google logins as needed for web and mobile apps. :::
126+
127+
1. Select the `Authentication Type` based on your application need from the dropdown. We're
128+
selecting `GitHub` in this example.
27129
![Create Aggregate Verifiier on Web3Auth Dashboard](/images/dashboard/create-verifier-aggregate-auth0-github.png)
28-
7. Select `Email` as the **JWT Verifier ID** and enter the `Auth0 Client ID` and `Auth0 Domain` from your Auth0 application. See how to create a new
29-
Auth0 application [here](https://auth0.com/docs/quickstart/webapp/).
30130

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

34137
:::info NOTE
35138

36-
1. Add the [GitHub Social Connection](https://marketplace.auth0.com/integrations/github-social-connection) to your Auth0 application.
37-
2. One has to request an email from the user while setting up the GitHub Social Connection on the Auth0 Dashboard.
139+
1. Add the
140+
[GitHub Social Connection](https://marketplace.auth0.com/integrations/github-social-connection)
141+
to your Auth0 application.
142+
2. One has to request an email from the user while setting up the GitHub Social Connection on the
143+
Auth0 Dashboard.
38144
![Request Email address for GitHub Social connection](/dashboard/verifiers/aggregate-verifier/av-a0-github-email.png)
39145

40146
:::
41147

42-
8. Similarly, create a third sub-verifier for `Email Passwordless` via Auth0. Follow the above steps from 5 to 8, and select `Email Passwordless` in
43-
place of `GitHub`.
44-
![Create Email Passwordless Sub Verifiier on Web3Auth Dashboard](/images/dashboard/create-verifier-aggregate-auth0-email-passwordless-filled.png)
45-
9. Finally, click on `Create` to deploy the verifier.
148+
1. Similarly, create a third sub-verifier for `Email Passwordless`. Click on `Social Login Provider`
149+
and then select `Email Passwordless` as the Login provider from the dropdown list
150+
![Create Email Passwordless Sub Verifiier on Web3Auth Dashboard](/images/dashboard/create-verifier-aggregate-email-passwordless.png)
46151

47-
:::note NOTE
152+
1. Finally, click on `Create` to deploy the verifier.
153+
154+
It typically takes 5-10 minutes for the verifier to go live. Once deployed & live, you'll receive
155+
an email and the dashboard will display the 'Live' status for the verifier.
156+
157+
:::note
48158

49159
You can aggregate two or more verifiers.
50160

51161
:::
52162

53-
### Example
163+
## Implementation Example
54164

55165
```tsx
56166
import { Web3AuthNoModal } from "@web3auth/no-modal";
57-
import { OpenloginAdapter } from "@web3auth/openlogin-adapter";
167+
import { AuthAdapter } from "@web3auth/auth-adapter";
58168
import { EthereumPrivateKeyProvider } from "@web3auth/ethereum-provider";
169+
import { CHAIN_NAMESPACES } from "@web3auth/base";
59170

60-
const clientId = "BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ";
61-
// get it from https://dashboard.web3auth.io by creating a Plug n Play project.
171+
const clientId =
172+
"BPi5PB_UiIZ-cPz1GtV5i1I2iOSOHuimiXBI0e-Oe_u6X3oVAbCiAZOTEBtTXw4tsluTITPqA8zMsfxIKMjiqNQ"; // get it from https://dashboard.web3auth.io by creating a Plug n Play project.
62173

63174
const chainConfig = {
64-
chainNamespace: "eip155",
175+
chainNamespace: CHAIN_NAMESPACES.EIP155,
65176
chainId: "0x1",
66177
rpcTarget: "https://rpc.ankr.com/eth",
67178
displayName: "Ethereum Mainnet",
@@ -79,58 +190,55 @@ const web3auth = new Web3AuthNoModal({
79190
privateKeyProvider: privateKeyProvider,
80191
});
81192

82-
const openloginAdapter = new OpenloginAdapter({
193+
const authAdapter = new AuthAdapter({
83194
adapterSettings: {
84195
loginConfig: {
85196
// Google login
86197
google: {
87-
verifier: "aggregate-sapphire", // Pass the Verifier name here. eg. w3a-agg-example
198+
verifier: "aggregate-sapphire", // Pass the Verifier name here. eg. aggregate-sapphire
88199
verifierSubIdentifier: "w3a-google", // Pass the Sub-Verifier here. eg w3a-google
89200
typeOfLogin: "google", // Pass the type of login provider.
90201
clientId: "519228911939-cri01h55lsjbsia1k7ll6qpalrus75ps.apps.googleusercontent.com", // Pass the Google `Client ID` here.
91202
},
92203
// GitHub Login via Auth0
93204
github: {
94-
verifier: "aggregate-sapphire", // Pass the Verifier name here. eg. w3a-agg-example
205+
verifier: "aggregate-sapphire", // Pass the Verifier name here. eg. aggregate-sapphire
95206
verifierSubIdentifier: "w3a-a0-github", // Pass the Sub-Verifier here. eg w3a-a0-github
96207
typeOfLogin: "jwt", // Pass the type of login provider. For Auth0, it's jwt and not Auth0.
97208
clientId: "hiLqaop0amgzCC0AXo4w0rrG9abuJTdu", // Pass the Auth0 `Client ID` here.
98209
},
99210
// Email Password Login via Auth0
100-
emailpasswordless: {
101-
verifier: "aggregate-sapphire", // Pass the Verifier name here. eg. w3a-agg-example
102-
verifierSubIdentifier: "w3a-a0-email-passwordless", // Pass the Sub-Verifier here. eg w3a-a0-email-passwordless
103-
typeOfLogin: "jwt", // Pass the type of login provider. For Auth0, it's jwt and not Auth0.
104-
clientId: "QiEf8qZ9IoasbZsbHvjKZku4LdnRC1Ct", // Pass the `Client ID` of your Auth0 Application.
211+
email_passwordless: {
212+
verifier: "aggregate-sapphire", // Pass the Verifier name here. eg. aggregate-sapphire
213+
verifierSubIdentifier: "w3a-email-passwordless", // Pass the Sub-Verifier here. eg w3a-email-passwordless
214+
typeOfLogin: "email_passwordless", // Pass the type of login provider.
215+
clientId, // Pass the Web3Auth `Client ID` here.
105216
},
106217
},
107218
},
108219
privateKeyProvider,
109220
});
110221

111-
web3auth.configureAdapter(openloginAdapter);
222+
web3auth.configureAdapter(authAdapter);
112223

113224
// Initialize
114225
await web3auth.init();
115226

116227
// When user clicks Google button, use this to Login with Google
117-
const web3authProvider = await web3auth.connectTo("openlogin", {
228+
const web3authProvider = await web3auth.connectTo("auth", {
118229
loginProvider: "google",
119230
});
120231

121232
// When user clicks Email Passwordless button, use this to Login with Email Passwordless via Auth0
122-
const web3authProvider = await web3auth.connectTo("openlogin", {
123-
loginProvider: "emailpasswordless",
233+
const web3authProvider = await web3auth.connectTo("auth", {
234+
loginProvider: "email_passwordless",
124235
extraLoginOptions: {
125-
domain: "https://web3auth.au.auth0.com", // Pass the Auth0 Domain here, eg. https://web3auth.au.auth0.com
126-
// This corresponds to the field inside jwt which must be used to uniquely identify the user.
127-
verifierIdField: "email", // This is mapped b/w google and github logins.
128-
isVerifierIdCaseSensitive: false,
236+
login_hint: email.trim(),
129237
},
130238
});
131239

132240
// When user clicks GitHub button, use this to Login with GitHub via Auth0
133-
const web3authProvider = await web3auth.connectTo("openlogin", {
241+
const web3authProvider = await web3auth.connectTo("auth", {
134242
loginProvider: "github",
135243
extraLoginOptions: {
136244
domain: "https://web3auth.au.auth0.com", // Pass the Auth0 Domain here, eg. https://web3auth.au.auth0.com
@@ -147,3 +255,39 @@ Check out the
147255
[**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).
148256

149257
:::
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)