Skip to content

Commit 6432eb9

Browse files
authored
Merge branch 'master' into hooks-guides
2 parents c3674bd + b450e3f commit 6432eb9

File tree

1,080 files changed

+40420
-27249
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,080 files changed

+40420
-27249
lines changed

.vscode/settings.json

Lines changed: 1 addition & 2 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,7 +54,7 @@
5554
"editor.defaultFormatter": "DotJoshJohnson.xml"
5655
},
5756
"[javascript]": {
58-
"editor.defaultFormatter": "vscode.typescript-language-features"
57+
"editor.defaultFormatter": "esbenp.prettier-vscode"
5958
},
6059
"[typescriptreact]": {
6160
"editor.defaultFormatter": "esbenp.prettier-vscode"

docs/README.mdx

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +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
29-
authentication, enabling you to craft a seamless end-to-end 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

3528
Our comprehensive array of guides, reference materials, and examples is designed to assist you at
3629
every step of your Web3Auth integration. Explore the nuances of web3 authentication and craft a
3730
tailored integration that meets your specific needs.
3831

3932
<ResourcesCards />
40-
41-
# Need Help?
42-
43-
<HelpCards />

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

Lines changed: 135 additions & 34 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

@@ -75,33 +145,31 @@ You can utilize this feature for projects on `sapphire_devnet` network for free.
75145

76146
:::
77147

78-
1. Similarly, create a third sub-verifier for `Email Passwordless` via Auth0. Follow the above steps
79-
for creating a sub verifier, and then select `Email Passwordless` in place of `GitHub`.
80-
81-
![Create Email Passwordless Sub Verifiier on Web3Auth Dashboard](/images/dashboard/create-verifier-aggregate-auth0-email-passwordless-filled.png)
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)
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";
98-
import { OpenloginAdapter } from "@web3auth/openlogin-adapter";
167+
import { AuthAdapter } from "@web3auth/auth-adapter";
99168
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,
@@ -122,58 +190,55 @@ const web3auth = new Web3AuthNoModal({
122190
privateKeyProvider: privateKeyProvider,
123191
});
124192

125-
const openloginAdapter = new OpenloginAdapter({
193+
const authAdapter = new AuthAdapter({
126194
adapterSettings: {
127195
loginConfig: {
128196
// Google login
129197
google: {
130-
verifier: "aggregate-sapphire", // Pass the Verifier name here. eg. w3a-agg-example
198+
verifier: "aggregate-sapphire", // Pass the Verifier name here. eg. aggregate-sapphire
131199
verifierSubIdentifier: "w3a-google", // Pass the Sub-Verifier here. eg w3a-google
132200
typeOfLogin: "google", // Pass the type of login provider.
133201
clientId: "519228911939-cri01h55lsjbsia1k7ll6qpalrus75ps.apps.googleusercontent.com", // Pass the Google `Client ID` here.
134202
},
135203
// GitHub Login via Auth0
136204
github: {
137-
verifier: "aggregate-sapphire", // Pass the Verifier name here. eg. w3a-agg-example
205+
verifier: "aggregate-sapphire", // Pass the Verifier name here. eg. aggregate-sapphire
138206
verifierSubIdentifier: "w3a-a0-github", // Pass the Sub-Verifier here. eg w3a-a0-github
139207
typeOfLogin: "jwt", // Pass the type of login provider. For Auth0, it's jwt and not Auth0.
140208
clientId: "hiLqaop0amgzCC0AXo4w0rrG9abuJTdu", // Pass the Auth0 `Client ID` here.
141209
},
142210
// Email Password Login via Auth0
143-
emailpasswordless: {
144-
verifier: "aggregate-sapphire", // Pass the Verifier name here. eg. w3a-agg-example
145-
verifierSubIdentifier: "w3a-a0-email-passwordless", // Pass the Sub-Verifier here. eg w3a-a0-email-passwordless
146-
typeOfLogin: "jwt", // Pass the type of login provider. For Auth0, it's jwt and not Auth0.
147-
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.
148216
},
149217
},
150218
},
151219
privateKeyProvider,
152220
});
153221

154-
web3auth.configureAdapter(openloginAdapter);
222+
web3auth.configureAdapter(authAdapter);
155223

156224
// Initialize
157225
await web3auth.init();
158226

159227
// When user clicks Google button, use this to Login with Google
160-
const web3authProvider = await web3auth.connectTo("openlogin", {
228+
const web3authProvider = await web3auth.connectTo("auth", {
161229
loginProvider: "google",
162230
});
163231

164232
// When user clicks Email Passwordless button, use this to Login with Email Passwordless via Auth0
165-
const web3authProvider = await web3auth.connectTo("openlogin", {
166-
loginProvider: "emailpasswordless",
233+
const web3authProvider = await web3auth.connectTo("auth", {
234+
loginProvider: "email_passwordless",
167235
extraLoginOptions: {
168-
domain: "https://web3auth.au.auth0.com", // Pass the Auth0 Domain here, eg. https://web3auth.au.auth0.com
169-
// This corresponds to the field inside jwt which must be used to uniquely identify the user.
170-
verifierIdField: "email", // This is mapped b/w google and github logins.
171-
isVerifierIdCaseSensitive: false,
236+
login_hint: email.trim(),
172237
},
173238
});
174239

175240
// When user clicks GitHub button, use this to Login with GitHub via Auth0
176-
const web3authProvider = await web3auth.connectTo("openlogin", {
241+
const web3authProvider = await web3auth.connectTo("auth", {
177242
loginProvider: "github",
178243
extraLoginOptions: {
179244
domain: "https://web3auth.au.auth0.com", // Pass the Auth0 Domain here, eg. https://web3auth.au.auth0.com
@@ -190,3 +255,39 @@ Check out the
190255
[**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).
191256

192257
:::
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>

docs/auth-provider-setup/authentication-service-providers/auth0-service-provider.mdx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -107,18 +107,18 @@ export const Auth0Guides = [
107107
icon: "logo-js.png",
108108
path: "/docs/guides/auth0",
109109
},
110-
{
111-
key: "android",
112-
title: "Android (Kotlin)",
113-
icon: "logo-android.png",
114-
path: "/docs/guides/android-auth0",
115-
},
116-
{
117-
key: "ios",
118-
title: "iOS (Swift)",
119-
icon: "logo-apple.png",
120-
path: "/docs/guides/ios-auth0",
121-
},
110+
// {
111+
// key: "android",
112+
// title: "Android (Kotlin)",
113+
// icon: "logo-android.png",
114+
// path: "/docs/guides/android-auth0",
115+
// },
116+
// {
117+
// key: "ios",
118+
// title: "iOS (Swift)",
119+
// icon: "logo-apple.png",
120+
// path: "/docs/guides/ios-auth0",
121+
// },
122122
{
123123
key: "flutter",
124124
title: "Flutter",

docs/auth-provider-setup/authentication-service-providers/firebase-service-provider.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,12 @@ export const FirebaseGuides = [
8484
icon: "logo-js.png",
8585
path: "/docs/guides/firebase",
8686
},
87-
{
88-
key: "android",
89-
title: "Android (Kotlin)",
90-
icon: "logo-android.png",
91-
path: "/docs/guides/android-firebase",
92-
},
87+
// {
88+
// key: "android",
89+
// title: "Android (Kotlin)",
90+
// icon: "logo-android.png",
91+
// path: "/docs/guides/android-firebase",
92+
// },
9393
{
9494
key: "flutter",
9595
title: "Flutter",

0 commit comments

Comments
 (0)