Skip to content

Commit e5b8fb9

Browse files
make notes modular
1 parent 644a2c0 commit e5b8fb9

27 files changed

Lines changed: 462 additions & 426 deletions

docs/sdk/pnp/android/custom-authentication.mdx

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,37 +7,36 @@ description: "Web3Auth PnP Android SDK - Using Custom Authentication | Documenta
77

88
import TabItem from "@theme/TabItem";
99
import Tabs from "@theme/Tabs";
10+
import GrowthPlanNote from "@site/src/common/docs/_growth_plan_note.mdx";
1011

11-
To use custom authentication (Using Social providers or Login providers like Auth0, AWS Cognito, Firebase etc. or even your own custom JWT login) you
12-
can add the configuration to the `loginConfig` parameter of the `Web3AuthOptions` object during the initialization.
12+
To use custom authentication (Using Social providers or Login providers like Auth0, AWS Cognito,
13+
Firebase etc. or even your own custom JWT login) you can add the configuration to the `loginConfig`
14+
parameter of the `Web3AuthOptions` object during the initialization.
1315

14-
The `loginConfig` parameter is a key value map. The key should be one of the `Web3AuthProvider` in its string form, and the value should be a
15-
`LoginConfigItem` instance.
16+
The `loginConfig` parameter is a key value map. The key should be one of the `Web3AuthProvider` in
17+
its string form, and the value should be a `LoginConfigItem` instance.
1618

1719
First, configure your own verifier in the Web3Auth Dashboard to use custom authentication.
1820

19-
:::note
20-
21-
This is a paid feature and the minimum [pricing plan](https://web3auth.io/pricing.html) to use this SDK in a production environment is the **Growth
22-
Plan**. You can use this feature in the development environment for free.
23-
24-
:::
21+
<GrowthPlanNote />
2522

2623
:::tip Create Custom Verifier
2724

28-
Check out how to create a **[Custom Verifier](/auth-provider-setup/verifiers)** on the Web3Auth Dashboard.
25+
Check out how to create a **[Custom Verifier](/auth-provider-setup/verifiers)** on the Web3Auth
26+
Dashboard.
2927

3028
:::
3129

3230
:::info using dapp share
3331

3432
- dApp Share is only returned for the Custom verifiers.
35-
- Also, 2FA should be enabled for the account using it. Use `mfaLevel = MFALevel.MANDATORY` in the `LoginParams` during login. See
36-
**[MFA](/sdk/pnp/android/mfa)** for more details.
33+
- Also, 2FA should be enabled for the account using it. Use `mfaLevel = MFALevel.MANDATORY` in the
34+
`LoginParams` during login. See **[MFA](/sdk/pnp/android/mfa)** for more details.
3735

3836
:::
3937

40-
Then, you should specify the details of your verifier in the `LoginConfigItem` struct, the details of this struct are as follows:
38+
Then, you should specify the details of your verifier in the `LoginConfigItem` struct, the details
39+
of this struct are as follows:
4140

4241
## `LoginConfigItem`
4342

@@ -241,8 +240,9 @@ web3Auth = Web3Auth (
241240

242241
## `ExtraLoginOptions` for special login methods
243242

244-
Additional to the `LoginConfig` you can pass extra options to the `login` function to configure the login flow for cases requiring additional info for
245-
enabling login. The `ExtraLoginOptions` accepts the following parameters:
243+
Additional to the `LoginConfig` you can pass extra options to the `login` function to configure the
244+
login flow for cases requiring additional info for enabling login. The `ExtraLoginOptions` accepts
245+
the following parameters:
246246

247247
<Tabs
248248
defaultValue="table"
@@ -314,8 +314,9 @@ data class ExtraLoginOptions(
314314

315315
### Using Auth0 Login
316316

317-
Auth0 has a special login flow, called the SPA flow. This flow requires a `client_id` and `domain` to be passed, and Web3Auth will get the JWT
318-
`id_token` from Auth0 directly. You can pass these configurations in the `ExtraLoginOptions` object in the login function.
317+
Auth0 has a special login flow, called the SPA flow. This flow requires a `client_id` and `domain`
318+
to be passed, and Web3Auth will get the JWT `id_token` from Auth0 directly. You can pass these
319+
configurations in the `ExtraLoginOptions` object in the login function.
319320

320321
```tsx
321322
web3Auth = Web3Auth (
@@ -348,9 +349,10 @@ val loginCompletableFuture: CompletableFuture<Web3AuthResponse> =
348349

349350
### Custom JWT Login
350351

351-
If you're using any other provider like Firebase/ AWS Cognito or deploying your own Custom JWT server, you need to put the jwt token into the
352-
`id_token` field of the `extraLoginOptions`, additionally, you need to pass over the `domain` field as well, which is mandatory. If you don't have a
353-
domain, just passover a string in that field.
352+
If you're using any other provider like Firebase/ AWS Cognito or deploying your own Custom JWT
353+
server, you need to put the jwt token into the `id_token` field of the `extraLoginOptions`,
354+
additionally, you need to pass over the `domain` field as well, which is mandatory. If you don't
355+
have a domain, just passover a string in that field.
354356

355357
```tsx
356358
web3Auth = Web3Auth (
@@ -381,7 +383,8 @@ val loginCompletableFuture: CompletableFuture<Web3AuthResponse> =
381383

382384
### Email Passwordless
383385

384-
To use the `EMAIL_PASSWORDLESS` login, you need to put the email into the `login_hint` field of the `extraLoginOptions`.
386+
To use the `EMAIL_PASSWORDLESS` login, you need to put the email into the `login_hint` field of the
387+
`extraLoginOptions`.
385388

386389
```kotlin
387390
val loginCompletableFuture: CompletableFuture<Web3AuthResponse> = web3Auth.login(

docs/sdk/pnp/android/mfa.mdx

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,36 +7,40 @@ description: "Web3Auth PnP Android SDK - Multi Factor Authentication | Documenta
77

88
import TabItem from "@theme/TabItem";
99
import Tabs from "@theme/Tabs";
10-
11-
At Web3Auth, we prioritize your security by offering Multi-Factor Authentication (MFA). MFA is an extra layer of protection that verifies your
12-
identity when accessing your account. To ensure ownership, you must provide two or more different backup factors. You have the option to choose from
13-
the device, social, backup factor (seed phrase), and password factors to guarantee access to your Web3 account. Once you create a recovery factor, MFA
14-
is enabled, and your keys are divided into three shares for off-chain multi-sig, making the key self-custodial. With backup factors, you can easily
15-
recover your account if you lose access to your original device or helps login into a new device.
16-
17-
You can set the mfaLevel within the `loginParams` to customize when mfa screen should be shown to user. It currently accepts 4 values:
18-
19-
- **`default`** - Setting the mfaLevel to default will present the MFA screen to user on every third login. `mfaLevel = MFALevel.DEFAULT`
20-
- **`optional`** - Setting mfaLevel to optional will present the MFA screen to user on every login but user will have the option to skip it.
21-
`mfaLevel = MFALevel.OPTIONAL`
22-
- **`mandatory`** - Setting mfaLevel to mandatory will make it mandatory for user to setup MFA after login. `mfaLevel = MFALevel.MANDATORY`
23-
- **`none`** - Setting mfaLevel to none will skip the mfa setup screen totally. `mfaLevel = MFALevel.NONE`
10+
import MFAMinimumPlan from "@site/src/common/docs/_mfa_minimum_plan.mdx";
11+
12+
At Web3Auth, we prioritize your security by offering Multi-Factor Authentication (MFA). MFA is an
13+
extra layer of protection that verifies your identity when accessing your account. To ensure
14+
ownership, you must provide two or more different backup factors. You have the option to choose from
15+
the device, social, backup factor (seed phrase), and password factors to guarantee access to your
16+
Web3 account. Once you create a recovery factor, MFA is enabled, and your keys are divided into
17+
three shares for off-chain multi-sig, making the key self-custodial. With backup factors, you can
18+
easily recover your account if you lose access to your original device or helps login into a new
19+
device.
20+
21+
You can set the mfaLevel within the `loginParams` to customize when mfa screen should be shown to
22+
user. It currently accepts 4 values:
23+
24+
- **`default`** - Setting the mfaLevel to default will present the MFA screen to user on every third
25+
login. `mfaLevel = MFALevel.DEFAULT`
26+
- **`optional`** - Setting mfaLevel to optional will present the MFA screen to user on every login
27+
but user will have the option to skip it. `mfaLevel = MFALevel.OPTIONAL`
28+
- **`mandatory`** - Setting mfaLevel to mandatory will make it mandatory for user to setup MFA after
29+
login. `mfaLevel = MFALevel.MANDATORY`
30+
- **`none`** - Setting mfaLevel to none will skip the mfa setup screen totally.
31+
`mfaLevel = MFALevel.NONE`
2432

2533
To trigger the MFA flow after authentication, you can use `enableMFA` method.
2634

2735
:::caution Note
2836

29-
If you are using default verifiers, your users may have set up MFA on other dApps that also use default Web3Auth verifiers. In this case, the MFA
30-
screen will continue to appear if the user has enabled MFA on other dApps. This is because MFA cannot be turned off once it is enabled.
37+
If you are using default verifiers, your users may have set up MFA on other dApps that also use
38+
default Web3Auth verifiers. In this case, the MFA screen will continue to appear if the user has
39+
enabled MFA on other dApps. This is because MFA cannot be turned off once it is enabled.
3140

3241
:::
3342

34-
:::note Minimum Growth plan required
35-
36-
This is a paid feature and the minimum [pricing plan](https://web3auth.io/pricing.html) to use this SDK in a production environment is the **Growth
37-
Plan**. You can use this feature in the development environment for free.
38-
39-
:::
43+
<MFAMinimumPlan />
4044

4145
```kotlin
4246
web3Auth.login(LoginParams(selectedLoginProvider, mfaLevel = MFALevel.MANDATORY))
@@ -86,12 +90,14 @@ class MainActivity : AppCompatActivity() {
8690

8791
:::note Minimum SCALE plan required
8892

89-
This is a paid feature and the minimum [pricing plan](https://web3auth.io/pricing.html) to use this SDK in a production environment is the **SCALE
90-
Plan**. You can use this feature in the development environment for free.
93+
This is a paid feature and the minimum [pricing plan](https://web3auth.io/pricing.html) to use this
94+
SDK in a production environment is the **SCALE Plan**. You can use this feature in the development
95+
environment for free.
9196

9297
:::
9398

94-
You can configure the order of MFA or enable/disable MFA type by passing the `mfaSettings` object in `Web3AuthOptions`.
99+
You can configure the order of MFA or enable/disable MFA type by passing the `mfaSettings` object in
100+
`Web3AuthOptions`.
95101

96102
`MfaSettings`
97103

docs/sdk/pnp/android/whitelabel.mdx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,13 @@ description: "Web3Auth PnP Android SDK - Whitelabel | Documentation - Web3Auth"
88
import TabItem from "@theme/TabItem";
99
import Tabs from "@theme/Tabs";
1010
import WhiteLabelShowcase from "@site/src/common/sdk/pnp/_whitelabel_showcase.mdx";
11+
import GrowthPlanNote from "@site/src/common/docs/_growth_plan_note.mdx";
1112

12-
For defining custom UI, branding, and translations for your brand, you just need to specify an additional parameter within the `Web3AuthOptions`
13-
object called `whiteLabel`. This parameter takes object called `WhiteLabelData`.
13+
For defining custom UI, branding, and translations for your brand, you just need to specify an
14+
additional parameter within the `Web3AuthOptions` object called `whiteLabel`. This parameter takes
15+
object called `WhiteLabelData`.
1416

15-
:::note
16-
17-
This is a paid feature and the minimum [pricing plan](https://web3auth.io/pricing.html) to use this SDK in a production environment is the **Growth
18-
Plan**. You can use this feature in the development environment for free.
19-
20-
:::
17+
<GrowthPlanNote />
2118

2219
### Arguments
2320

docs/sdk/pnp/flutter/custom-authentication.mdx

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,34 @@ description: "Web3Auth PnP Flutter SDK - Using Custom Authentication | Documenta
77

88
import TabItem from "@theme/TabItem";
99
import Tabs from "@theme/Tabs";
10+
import GrowthPlanNote from "@site/src/common/docs/_growth_plan_note.mdx";
1011

11-
To use custom authentication (Using Social providers or Login providers like Auth0, AWS Cognito, Firebase etc. or even your own custom JWT login) you
12-
can add the configuration to the `loginConfig` parameter of the `LoginParams` object during the initialization.
12+
To use custom authentication (Using Social providers or Login providers like Auth0, AWS Cognito,
13+
Firebase etc. or even your own custom JWT login) you can add the configuration to the `loginConfig`
14+
parameter of the `LoginParams` object during the initialization.
1315

14-
The `loginConfig` parameter is a key value map. The key should be one of the `TypeOfLogin` in its string form, and the value should be a
15-
`LoginConfigItem` struct.
16+
The `loginConfig` parameter is a key value map. The key should be one of the `TypeOfLogin` in its
17+
string form, and the value should be a `LoginConfigItem` struct.
1618

17-
To use custom authentication, first you'll need to configure your own verifier in the Web3Auth Dashboard in Custom Authentication section.
19+
To use custom authentication, first you'll need to configure your own verifier in the Web3Auth
20+
Dashboard in Custom Authentication section.
1821

1922
:::tip Create Custom Verifier
2023

21-
Check out how to create a **[Custom Verifier](/auth-provider-setup/verifiers)** on the Web3Auth Dashboard.
24+
Check out how to create a **[Custom Verifier](/auth-provider-setup/verifiers)** on the Web3Auth
25+
Dashboard.
2226

2327
:::
2428

2529
:::info using dapp share
2630

2731
- dApp Share is only returned for the Custom verifiers.
28-
- Also, 2FA should be enabled for the account using it. Use `mfaLevel = MFALevel.MANDATORY` in the `LoginParams` during login. See
29-
**[MFA](/sdk/pnp/flutter/mfa)** for more details.
32+
- Also, 2FA should be enabled for the account using it. Use `mfaLevel = MFALevel.MANDATORY` in the
33+
`LoginParams` during login. See **[MFA](/sdk/pnp/flutter/mfa)** for more details.
3034

3135
:::
3236

33-
:::note
34-
35-
This is a paid feature and the minimum [pricing plan](https://web3auth.io/pricing.html) to use this SDK in a production environment is the **Growth
36-
Plan**. You can use this feature in the development environment for free.
37-
38-
:::
37+
<GrowthPlanNote />
3938

4039
Then, specify the details of your verifier in the `LoginConfigItem` struct as follows:
4140

@@ -312,8 +311,9 @@ final Web3AuthResponse response = await Web3AuthFlutter.login(
312311

313312
## `ExtraLoginOptions` for special login methods
314313

315-
Additional to the `LoginConfig` you can pass extra options to the `login` function to configure the login flow for cases requiring additional info for
316-
enabling login. The `ExtraLoginOptions` accepts the following parameters:
314+
Additional to the `LoginConfig` you can pass extra options to the `login` function to configure the
315+
login flow for cases requiring additional info for enabling login. The `ExtraLoginOptions` accepts
316+
the following parameters:
317317

318318
<Tabs
319319
defaultValue="table"
@@ -432,8 +432,9 @@ class ExtraLoginOptions {
432432

433433
### Using Auth0 Login
434434

435-
Auth0 has a special login flow, called the SPA flow. This flow requires a `client_id` and `domain` to be passed, and Web3Auth will get the JWT
436-
`id_token` from Auth0 directly. You can pass these configurations in the `ExtraLoginOptions` object in the `login` function.
435+
Auth0 has a special login flow, called the SPA flow. This flow requires a `client_id` and `domain`
436+
to be passed, and Web3Auth will get the JWT `id_token` from Auth0 directly. You can pass these
437+
configurations in the `ExtraLoginOptions` object in the `login` function.
437438

438439
```dart
439440
Future<void> initWeb3Auth() async {
@@ -487,8 +488,8 @@ final Web3AuthResponse response = await Web3AuthFlutter.login(
487488

488489
### Custom JWT Login
489490

490-
If you're using any other provider like Firebase, AWS Cognito or deploying your own Custom JWT server, you need to put the jwt token into the
491-
`id_token` parameter of the `ExtraLoginOptions`.
491+
If you're using any other provider like Firebase, AWS Cognito or deploying your own Custom JWT
492+
server, you need to put the jwt token into the `id_token` parameter of the `ExtraLoginOptions`.
492493

493494
```dart
494495
Future<void> initWeb3Auth() async {
@@ -540,8 +541,9 @@ final Web3AuthResponse response = await Web3AuthFlutter.login(
540541

541542
### Email Passwordless
542543

543-
To use the `EMAIL_PASSWORDLESS` login, you need to put the email into the `login_hint` parameter of the `ExtraLoginOptions`. By default, the login
544-
flow will be `code` flow, if you want to use the `link` flow, you need to put `flow_type` into the `additionalParams` parameter of the
544+
To use the `EMAIL_PASSWORDLESS` login, you need to put the email into the `login_hint` parameter of
545+
the `ExtraLoginOptions`. By default, the login flow will be `code` flow, if you want to use the
546+
`link` flow, you need to put `flow_type` into the `additionalParams` parameter of the
545547
`ExtraLoginOptions`.
546548

547549
```dart

docs/sdk/pnp/flutter/mfa.mdx

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,24 @@ description: "Web3Auth PnP Flutter SDK - Multi Factor Authentication | Documenta
77

88
import TabItem from "@theme/TabItem";
99
import Tabs from "@theme/Tabs";
10+
import MFAMinimumPlan from "@site/src/common/docs/_mfa_minimum_plan.mdx";
1011

11-
At Web3Auth, we prioritize your security by offering Multi-Factor Authentication (MFA). MFA is an extra layer of protection that verifies your
12-
identity when accessing your account. To ensure ownership, you must provide two or more different backup factors. You have the option to choose from
13-
the device, social, backup factor (seed phrase), and password factors to guarantee access to your Web3 account. Once you create a recovery factor, MFA
14-
is enabled, and your keys are divided into three shares for off-chain multi-sig, making the key self-custodial. With backup factors, you can easily
15-
recover your account if you lose access to your original device or helps login into a new device.
12+
At Web3Auth, we prioritize your security by offering Multi-Factor Authentication (MFA). MFA is an
13+
extra layer of protection that verifies your identity when accessing your account. To ensure
14+
ownership, you must provide two or more different backup factors. You have the option to choose from
15+
the device, social, backup factor (seed phrase), and password factors to guarantee access to your
16+
Web3 account. Once you create a recovery factor, MFA is enabled, and your keys are divided into
17+
three shares for off-chain multi-sig, making the key self-custodial. With backup factors, you can
18+
easily recover your account if you lose access to your original device or helps login into a new
19+
device.
1620

17-
:::note Minimum Growth plan required
18-
19-
This is a paid feature and the minimum [pricing plan](https://web3auth.io/pricing.html) to use this SDK in a production environment is the **Growth
20-
Plan**. You can use this feature in the development environment for free.
21-
22-
:::
21+
<MFAMinimumPlan />
2322

2423
## Using the `mfaLevel` to enable MFA
2524

26-
For a dApp, we provide various options to set up Multi-Factor Authentication. You can customize the MFA screen by setting the `mfaLevel` argument. You
27-
can enable or disable a backup factor and change their order. Currently, there are four values for `mfaLevel`:
25+
For a dApp, we provide various options to set up Multi-Factor Authentication. You can customize the
26+
MFA screen by setting the `mfaLevel` argument. You can enable or disable a backup factor and change
27+
their order. Currently, there are four values for `mfaLevel`:
2828

2929
- `default`: presents the MFA screen every third login
3030
- `optional`: presents the MFA screen on every login, but you can skip it
@@ -33,8 +33,9 @@ can enable or disable a backup factor and change their order. Currently, there a
3333

3434
:::caution Note
3535

36-
If you are using default verifiers, your users may have set up MFA on other dApps that also use default Web3Auth verifiers. In this case, the MFA
37-
screen will continue to appear if the user has enabled MFA on other dApps. This is because MFA cannot be turned off once it is enabled.
36+
If you are using default verifiers, your users may have set up MFA on other dApps that also use
37+
default Web3Auth verifiers. In this case, the MFA screen will continue to appear if the user has
38+
enabled MFA on other dApps. This is because MFA cannot be turned off once it is enabled.
3839

3940
:::
4041

@@ -84,12 +85,14 @@ final Web3AuthResponse response = await Web3AuthFlutter.login(
8485

8586
### Using the `mfaSettings` to configure MFA Order
8687

87-
You can configure the order of MFA, and enable or disable MFA type by passing the `mfaSettings` object in `Web3AuthOptions`.
88+
You can configure the order of MFA, and enable or disable MFA type by passing the `mfaSettings`
89+
object in `Web3AuthOptions`.
8890

8991
:::note Minimum SCALE plan required
9092

91-
This is a paid feature and the minimum [pricing plan](https://web3auth.io/pricing.html) to use this SDK in a production environment is the **SCALE
92-
Plan**. You can use this feature in the development environment for free.
93+
This is a paid feature and the minimum [pricing plan](https://web3auth.io/pricing.html) to use this
94+
SDK in a production environment is the **SCALE Plan**. You can use this feature in the development
95+
environment for free.
9396

9497
:::
9598

0 commit comments

Comments
 (0)