Skip to content

Commit a7a2d4e

Browse files
Merge pull request #1070 from Web3Auth/android-pnp-v10
[Android PnP] Update docs to latest
2 parents 76171ba + f595188 commit a7a2d4e

File tree

3 files changed

+57
-2
lines changed

3 files changed

+57
-2
lines changed

docs/sdk/pnp/android/usage.mdx

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Android applications.
2424
| [getEd25519PrivKey](#ed25519-private-key) | Retrieve the user's ed25519 key. The key can be used to sign transactions for chains using the ed25519 curve like Solana, Near, Algorand, and others. |
2525
| [getUserInfo](#retrieve-user-information) | Retrieve the user information, such as login provider, name, email, oAuth token, etc. |
2626
| [enableMFA](#enable-mfa-for-a-user) | Use to trigger the setup MFA flow for the users. |
27+
| [manageMFA](#manage-mfa-for-a-user) | Use to trigger the manage MFA flow for the users. |
2728
| [launchWalletServices](#launch-wallet-services) | Use to open the templated wallet UI in WebView. |
2829
| [request](#request-signature) | Use to open templated transaction screens for signing EVM transactions. |
2930

@@ -405,6 +406,60 @@ val web3Auth = Web3Auth(
405406

406407
<EnableMFAMethod />
407408

409+
## Manage MFA for a user
410+
411+
The `manageMFA` method is used to trigger manage MFA flow for users, allowing users to update their
412+
MFA settings. The method takes `LoginParams` which will used during custom verifiers. If you are
413+
using default login providers, you don't need to pass `LoginParams`. If you are using custom jwt
414+
verifiers, you need to pass the JWT token in `loginParams` as well.
415+
416+
<Tabs
417+
defaultValue="default-verifier"
418+
values={[
419+
{ label: "Default Verifier", value: "default-verifier" },
420+
{ label: "Custom JWT Verifier", value: "custom-jwt-verifier" },
421+
]}
422+
>
423+
424+
<TabItem value = "default-verifier">
425+
426+
```kotlin
427+
val manageMFACF = web3Auth.manageMFA()
428+
429+
manageMFACF.whenComplete{_, error ->
430+
if (error == null) {
431+
// Handle success
432+
} else {
433+
// Handle error
434+
}
435+
}
436+
```
437+
438+
</TabItem>
439+
440+
<TabItem value="custom-jwt-verifier">
441+
442+
```kotlin title="Usage"
443+
val loginParams = LoginParams(
444+
Provider.JWT,
445+
extraLoginOptions = ExtraLoginOptions(id_token = "your_jwt_token")
446+
)
447+
448+
val manageMFACF = web3Auth.manageMFA(loginParams)
449+
450+
manageMFACF.whenComplete{_, error ->
451+
if (error == null) {
452+
// Handle success
453+
} else {
454+
// Handle error
455+
}
456+
}
457+
458+
```
459+
460+
</TabItem>
461+
</Tabs>
462+
408463
## Launch Wallet Services
409464

410465
The `launchWalletServices` method launches a WebView which allows you to use the templated wallet UI

src/common/sdk/pnp/android/_installation.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
dependencies {
33
// ...
44
// focus-next-line
5-
implementation 'com.github.web3auth:web3auth-android-sdk:9.0.4'
5+
implementation 'com.github.web3auth:web3auth-android-sdk:9.1.2'
66
}
77
```

src/common/versions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const pnpWebVersion = `9.3.x`;
2-
export const pnpAndroidVersion = `9.0.4`;
2+
export const pnpAndroidVersion = `9.1.2`;
33
export const pnpIOSVersion = `11.0.5`;
44
export const pnpRNVersion = `8.1.x`;
55
export const pnpFlutterVersion = `6.1.2`;

0 commit comments

Comments
 (0)