Skip to content

Commit b1aa8a9

Browse files
update docs for Android
1 parent 9669672 commit b1aa8a9

7 files changed

Lines changed: 126 additions & 219 deletions

File tree

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

Lines changed: 40 additions & 25 deletions
Large diffs are not rendered by default.

docs/sdk/pnp/android/initialize.mdx

Lines changed: 12 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,18 @@ The Web3Auth Constructor takes an object with `Web3AuthOptions` as input.
4242

4343
<TabItem value="table">
4444

45-
| Parameter | Type | Mandatory | Description |
46-
| ---------------- | ------------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
47-
| `context` | `android.content.Context` | Yes | Android context to launch Web-based authentication, usually is the current activity |
48-
| `clientId` | `String` | Yes | Your Web3Auth Project ID |
49-
| `network` | `Network` | Yes | Network to run Web3Auth, either `MAINNET`, `TESTNET`, `AQUA`, `CYAN`, `SAPPHIRE_MAINNET` or `SAPPHIRE_TESTNET` |
50-
| `buildEnv` | `BuildEnv` | No | Option for auth service, `BuildEnv.PRODUCTION`, `BuildEnv.STAGING`, `BuildEnv.TESTING` available |
51-
| `redirectUrl` | `android.net.Uri` | No | URL that Web3Auth will redirect API responses, default is `null` |
52-
| `whiteLabel` | `WhiteLabelData` | No | A configuration optional object to customize UI, branding, and translations for your brand. Refer [WhiteLabel](/pnp/features/whitelabel) section for more info. |
53-
| `loginConfig` | `LoginConfigItem` | No | A configuration optional object to use custom authentication. Refer [Custom Authentication](/pnp/features/custom-authentication) for more info. |
54-
| `useCoreKitKey` | `Boolean` | No | Use Core Kit Key true to the Core Kit keys. |
55-
| `chainNamespace` | `ChainNamespace` | No | A configuration optional object to use chain namespace. `EIP155`, `SOLANA` are the availale namespaces. |
56-
| `mfaSettings` | `MfaSettings` | No | MFA Settings |
57-
| `sessionTime` | `Int` | No | Session Time in seconds, default is `86400` seconds |
45+
| Parameter | Description |
46+
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
47+
| `context` | Android context to launch Web-based authentication, usually is the current activity. It's a mandatory field, and accepts `android.content.Context` as a value. |
48+
| `clientId` | Your Web3Auth Client ID. You can get it from Web3Auth [Dashboard](https://dashboard.web3auth.io/) under project details. It's a mandatory field of type `String` |
49+
| `network` | Defines the Web3Auth network. It's a mandatory field of type Network. |
50+
| `redirectUrl` | URL that Web3Auth will redirect API responses upon successful authentication from browser. It's a mandatory field of type `Uri`. |
51+
| `whiteLabel?` | WhiteLabel options for web3auth. It helps you define custom UI, branding, and translations for your brand app. It takes `WhiteLabelData` as a value. |
52+
| `loginConfig?` | Login config for the custom verifiers. It takes `HashMap<String, LoginConfigItem>` as a value. |
53+
| `useCoreKitKey?` | Use CoreKit Key to get core kit key. It's an optional field with default value as `false`. |
54+
| `chainNamespace?` | Chain Namespace [`EIP155` and `SOLANA`]. It takes `ChainNamespace` as a value. |
55+
| `mfaSettings?` | Allows developers to configure the Mfa settings for authentication. It takes `MfaSettings` as a value. |
56+
| `sessionTime?` | It allows developers to configure the session management time. Session Time is in seconds, default is 86400 seconds which is 1 day. `sessionTime` can be max 7 days |
5857

5958
</TabItem>
6059

@@ -107,53 +106,6 @@ Add the below line to your `app/res/values/strings.xml` file:
107106
</resources>
108107
```
109108

110-
### Using the `mfaSettings` to configure MFA Order
111-
112-
You can configure the order of MFA or enable/disable MFA type by passing the `mfaSettings` object in `Web3AuthOptions`.
113-
114-
`MfaSettings`
115-
116-
<Tabs
117-
defaultValue="table"
118-
values={[
119-
{ label: "Table", value: "table" },
120-
{ label: "Class", value: "class" },
121-
]}
122-
>
123-
124-
<TabItem value="table">
125-
126-
`deviceShareFactor` | `backUpShareFactor` | `socialBackupFactor` | `passwordFactor`
127-
128-
| Parameter | Type | Mandatory | Description |
129-
| ----------- | ---------- | --------- | ---------------------- |
130-
| `enable` | `Boolean` | Yes | Enable/Disable MFA |
131-
| `priority` | `Int?` | No | Priority of MFA |
132-
| `mandatory` | `Boolean?` | No | Mandatory/Optional MFA |
133-
134-
</TabItem>
135-
136-
<TabItem value="class">
137-
138-
```kotlin
139-
data class MfaSetting(
140-
var enable: Boolean,
141-
var priority: Int?,
142-
var mandatory: Boolean?
143-
)
144-
145-
data class MfaSettings(
146-
private var deviceShareFactor: MfaSetting? = null,
147-
private var backUpShareFactor: MfaSetting? = null,
148-
private var socialBackupFactor: MfaSetting? = null,
149-
private var passwordFactor: MfaSetting? = null,
150-
)
151-
```
152-
153-
</TabItem>
154-
155-
</Tabs>
156-
157109
### Session Management
158110

159111
The Session Management feature allows you to check the existing sessions with Web3Auth. The `sessionResponse()` will allow users to remain

docs/sdk/pnp/android/mfa.mdx

Lines changed: 40 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ screen will continue to appear if the user has enabled MFA on other dApps. This
3333

3434
:::note Minimum Growth plan required
3535

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
37-
**Growth Plan**. You can use this feature in the development environment for free.
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.
3838

3939
:::
4040

@@ -105,25 +105,18 @@ You can configure the order of MFA or enable/disable MFA type by passing the `mf
105105

106106
<TabItem value="table">
107107

108-
`deviceShareFactor` | `backUpShareFactor` | `socialBackupFactor` | `passwordFactor`
109-
110-
| Parameter | Type | Mandatory | Description |
111-
| ----------- | ------ | --------- | ---------------------- |
112-
| `enable` | `bool` | Yes | Enable/Disable MFA |
113-
| `priority` | `int` | No | Priority of MFA |
114-
| `mandatory` | `bool` | No | Mandatory/Optional MFA |
108+
| Parameter | Description |
109+
| --------------------- | ----------------------------------------------------------------------- |
110+
| `deviceShareFactor?` | MFA setting for deviceShareFactor. It accepts `MfaSetting` as a value. |
111+
| `backUpShareFactor?` | MFA setting for backUpShareFactor. It accepts `MfaSetting` as a value. |
112+
| `socialBackupFactor?` | MFA setting for socialBackupFactor. It accepts `MfaSetting` as a value. |
113+
| `passwordFactor?` | MFA setting for passwordFactor. It accepts `MfaSetting` as a value. |
115114

116115
</TabItem>
117116

118117
<TabItem value="class">
119118

120119
```kotlin
121-
data class MfaSetting(
122-
var enable: Boolean,
123-
var priority: Int?,
124-
var mandatory: Boolean?
125-
)
126-
127120
data class MfaSettings(
128121
private var deviceShareFactor: MfaSetting? = null,
129122
private var backUpShareFactor: MfaSetting? = null,
@@ -133,7 +126,39 @@ You can configure the order of MFA or enable/disable MFA type by passing the `mf
133126
```
134127

135128
</TabItem>
129+
</Tabs>
130+
131+
`MfaSetting`
132+
133+
<Tabs
134+
defaultValue="table"
135+
values={[
136+
{ label: "Table", value: "table" },
137+
{ label: "Class", value: "class" },
138+
]}
139+
>
140+
141+
<TabItem value="table">
142+
143+
| Parameter | Description |
144+
| ------------ | ------------------------------------------------------------------------------- |
145+
| `enable` | Enable/Disable MFA. It accepts `Boolean` as a value. |
146+
| `priority?` | Priority of MFA. It accepts `int` as a value, where valid range is from 1 to 4. |
147+
| `mandatory?` | Mandatory/Optional MFA. It acccepts `Boolean` as a value. |
148+
149+
</TabItem>
150+
151+
<TabItem value="class">
136152

153+
```kotlin
154+
data class MfaSetting(
155+
var enable: Boolean,
156+
var priority: Int?,
157+
var mandatory: Boolean?
158+
)
159+
```
160+
161+
</TabItem>
137162
</Tabs>
138163

139164
```kotlin

0 commit comments

Comments
 (0)