Skip to content

Commit b9a5953

Browse files
committed
Add mfaSettings to all other SDKs
1 parent b33711c commit b9a5953

File tree

6 files changed

+69
-25
lines changed

6 files changed

+69
-25
lines changed

docs/sdk/pnp/android/mfa.mdx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,14 @@ in `Web3AuthOptions`.
9393

9494
<TabItem value="table">
9595

96-
| Parameter | Description |
97-
| --------------------- | ----------------------------------------------------------------------- |
98-
| `deviceShareFactor?` | MFA setting for deviceShareFactor. It accepts `MfaSetting` as a value. |
99-
| `backUpShareFactor?` | MFA setting for backUpShareFactor. It accepts `MfaSetting` as a value. |
100-
| `socialBackupFactor?` | MFA setting for socialBackupFactor. It accepts `MfaSetting` as a value. |
101-
| `passwordFactor?` | MFA setting for passwordFactor. It accepts `MfaSetting` as a value. |
96+
| Parameter | Description |
97+
| ---------------------- | ------------------------------------------------------------------------ |
98+
| `deviceShareFactor?` | MFA setting for deviceShareFactor. It accepts `MfaSetting` as a value. |
99+
| `backUpShareFactor?` | MFA setting for backUpShareFactor. It accepts `MfaSetting` as a value. |
100+
| `socialBackupFactor?` | MFA setting for socialBackupFactor. It accepts `MfaSetting` as a value. |
101+
| `passwordFactor?` | MFA setting for passwordFactor. It accepts `MfaSetting` as a value. |
102+
| `passkeysFactor?` | MFA setting for passkeysFactor. It accepts `MfaSetting` as a value. |
103+
| `authenticatorFactor?` | MFA setting for authenticatorFactor. It accepts `MfaSetting` as a value. |
102104

103105
</TabItem>
104106

@@ -110,6 +112,8 @@ in `Web3AuthOptions`.
110112
private var backUpShareFactor: MfaSetting? = null,
111113
private var socialBackupFactor: MfaSetting? = null,
112114
private var passwordFactor: MfaSetting? = null,
115+
private var passkeysFactor: MfaSetting? = null,
116+
private var authenticatorFactor: MfaSetting? = null,
113117
)
114118
```
115119

@@ -169,6 +173,8 @@ val web3Auth = Web3Auth(
169173
socialBackupFactor = MfaSetting(true, 2, true),
170174
passwordFactor = MfaSetting(true, 3, false),
171175
backUpShareFactor = MfaSetting(true, 4, false),
176+
passkeysFactor = MfaSetting(true, 5, true),
177+
authenticatorFactor = MfaSetting(true, 6, true),
172178
)
173179
// focus-end
174180
)

docs/sdk/pnp/flutter/mfa.mdx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,14 @@ parameter in `Web3AuthOptions` during initialization.
9393

9494
<TabItem value="table">
9595

96-
| Parameter | Description |
97-
| --------------------- | ----------------------------------------------------------------------- |
98-
| `deviceShareFactor?` | MFA setting for deviceShareFactor. It accepts `MfaSetting` as a value. |
99-
| `backUpShareFactor?` | MFA setting for backUpShareFactor. It accepts `MfaSetting` as a value. |
100-
| `socialBackupFactor?` | MFA setting for socialBackupFactor. It accepts `MfaSetting` as a value. |
101-
| `passwordFactor?` | MFA setting for passwordFactor. It accepts `MfaSetting` as a value. |
96+
| Parameter | Description |
97+
| ---------------------- | ------------------------------------------------------------------------ |
98+
| `deviceShareFactor?` | MFA setting for deviceShareFactor. It accepts `MfaSetting` as a value. |
99+
| `backUpShareFactor?` | MFA setting for backUpShareFactor. It accepts `MfaSetting` as a value. |
100+
| `socialBackupFactor?` | MFA setting for socialBackupFactor. It accepts `MfaSetting` as a value. |
101+
| `passwordFactor?` | MFA setting for passwordFactor. It accepts `MfaSetting` as a value. |
102+
| `passkeysFactor?` | MFA setting for passkeysFactor. It accepts `MfaSetting` as a value. |
103+
| `authenticatorFactor?` | MFA setting for authenticatorFactor. It accepts `MfaSetting` as a value. |
102104

103105
</TabItem>
104106

docs/sdk/pnp/ios/mfa.mdx

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,30 +101,36 @@ You can configure the order of MFA or enable/disable MFA type by passing the `mf
101101

102102
<TabItem value="table">
103103

104-
| Parameter | Description |
105-
| --------------------- | ----------------------------------------------------------------------- |
106-
| `deviceShareFactor?` | MFA setting for deviceShareFactor. It accepts `MfaSetting` as a value. |
107-
| `backUpShareFactor?` | MFA setting for backUpShareFactor. It accepts `MfaSetting` as a value. |
108-
| `socialBackupFactor?` | MFA setting for socialBackupFactor. It accepts `MfaSetting` as a value. |
109-
| `passwordFactor?` | MFA setting for passwordFactor. It accepts `MfaSetting` as a value. |
104+
| Parameter | Description |
105+
| ---------------------- | ------------------------------------------------------------------------ |
106+
| `deviceShareFactor?` | MFA setting for deviceShareFactor. It accepts `MfaSetting` as a value. |
107+
| `backUpShareFactor?` | MFA setting for backUpShareFactor. It accepts `MfaSetting` as a value. |
108+
| `socialBackupFactor?` | MFA setting for socialBackupFactor. It accepts `MfaSetting` as a value. |
109+
| `passwordFactor?` | MFA setting for passwordFactor. It accepts `MfaSetting` as a value. |
110+
| `passkeysFactor?` | MFA setting for passkeysFactor. It accepts `MfaSetting` as a value. |
111+
| `authenticatorFactor?` | MFA setting for authenticatorFactor. It accepts `MfaSetting` as a value. |
110112

111113
</TabItem>
112114

113115
<TabItem value="class">
114116

115117
```swift
116118
public struct MfaSettings: Codable {
117-
public init(deviceShareFactor: MfaSetting?, backUpShareFactor: MfaSetting?, socialBackupFactor: MfaSetting?, passwordFactor: MfaSetting?) {
119+
public init(deviceShareFactor: MfaSetting?, backUpShareFactor: MfaSetting?, socialBackupFactor: MfaSetting?, passwordFactor: MfaSetting?, passkeysFactor: MfaSetting?, authenticatorFactor: MfaSetting?) {
118120
self.deviceShareFactor = deviceShareFactor
119121
self.backUpShareFactor = backUpShareFactor
120122
self.socialBackupFactor = socialBackupFactor
121123
self.passwordFactor = passwordFactor
124+
self.passkeysFactor = passkeysFactor
125+
self.authenticatorFactor = authenticatorFactor
122126
}
123127

124128
let deviceShareFactor: MfaSetting?
125129
let backUpShareFactor: MfaSetting?
126130
let socialBackupFactor: MfaSetting?
127131
let passwordFactor: MfaSetting?
132+
let passkeysFactor: MfaSetting?
133+
let authenticatorFactor: MfaSetting?
128134
}
129135
```
130136

@@ -189,7 +195,9 @@ let web3auth = try await Web3Auth(W3AInitParams(
189195
deviceShareFactor: MfaSetting(enable: true, priority: 1),
190196
backUpShareFactor: MfaSetting(enable: true, priority: 2),
191197
socialBackupFactor: MfaSetting(enable: true, priority: 3),
192-
passwordFactor: MfaSetting(enable: true, priority: 4)
198+
passwordFactor: MfaSetting(enable: true, priority: 4),
199+
passkeysFactor: MfaSetting(enable: true, priority: 5),
200+
authenticatorFactor: MfaSetting(enable: true, priority: 6)
193201
)
194202
)
195203
// focus-end

docs/sdk/pnp/react-native/mfa.mdx

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,19 @@ You can configure the order of MFA or enable/disable MFA type by passing the `mf
5757

5858
- `deviceShareFactor`,
5959
- `backUpShareFactor`,
60-
- `socialBackupFactor`, and
61-
- `passwordFactor`.
60+
- `socialBackupFactor`,
61+
- `passwordFactor`,
62+
- `passkeysFactor`, and
63+
- `authenticatorFactor`.
6264

6365
```tsx
6466
export declare const MFA_FACTOR: {
6567
readonly DEVICE: "deviceShareFactor";
6668
readonly BACKUP_SHARE: "backUpShareFactor";
6769
readonly SOCIAL_BACKUP: "socialBackupFactor";
6870
readonly PASSWORD: "passwordFactor";
71+
readonly PASSKEYS: "passkeysFactor";
72+
readonly AUTHENTICATOR: "authenticatorFactor";
6973
};
7074
export type MFA_FACTOR_TYPE = (typeof MFA_FACTOR)[keyof typeof MFA_FACTOR];
7175
export type MFA_SETTINGS = {
@@ -106,6 +110,16 @@ const state = await web3auth.login({
106110
priority: 4,
107111
mandatory: true, // at least two factors are mandatory
108112
},
113+
passkeysFactor: {
114+
enable: true,
115+
priority: 5,
116+
mandatory: true, // at least two factors are mandatory
117+
},
118+
authenticatorFactor: {
119+
enable: true,
120+
priority: 6,
121+
mandatory: true, // at least two factors are mandatory
122+
},
109123
},
110124
});
111125
```

docs/sdk/pnp/unity/mfa.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ We offer the following backup factors under `mfaSettings`:
3737

3838
- `deviceShareFactor`,
3939
- `backUpShareFactor`,
40-
- `socialBackupFactor`, and
41-
- `passwordFactor`.
40+
- `socialBackupFactor`,
41+
- `passwordFactor`,
42+
- `passkeysFactor`, and
43+
- `authenticatorFactor`.
4244

4345
Choose the best options that suit your needs to ensure a safe and secure Web3 experience.
4446

@@ -151,6 +153,8 @@ public class Web3custom : MonoBehaviour
151153
new MfaSetting(true, 1, true),
152154
new MfaSetting(true, 1, true),
153155
new MfaSetting(true, 1, false),
156+
new MfaSetting(true, 1, true),
157+
new MfaSetting(true, 1, true),
154158
new MfaSetting(true, 1, true)
155159
)
156160
});

docs/sdk/pnp/unreal/mfa.mdx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,21 +78,31 @@ struct FMfaSettings
7878
UPROPERTY(EditAnywhere, BlueprintReadWrite)
7979
FMfaSetting passwordFactor;
8080

81+
UPROPERTY(EditAnywhere, BlueprintReadWrite)
82+
FMfaSetting passkeysFactor;
83+
84+
UPROPERTY(EditAnywhere, BlueprintReadWrite)
85+
FMfaSetting authenticatorFactor;
86+
8187
FMfaSettings() {};
8288

8389
void operator= (const FMfaSettings& other) {
8490
deviceShareFactor = other.deviceShareFactor;
8591
backUpShareFactor = other.backUpShareFactor;
8692
socialBackupFactor = other.socialBackupFactor;
8793
passwordFactor = other.passwordFactor;
94+
passkeysFactor = other.passkeysFactor;
95+
authenticatorFactor = other.authenticatorFactor;
8896
}
8997

9098
bool operator==(const FMfaSettings& other) const
9199
{
92100
if (deviceShareFactor == other.deviceShareFactor &&
93101
backUpShareFactor == other.backUpShareFactor &&
94102
socialBackupFactor == other.socialBackupFactor &&
95-
passwordFactor == other.passwordFactor)
103+
passwordFactor == other.passwordFactor &&
104+
passkeysFactor == other.passkeysFactor &&
105+
authenticatorFactor == other.authenticatorFactor)
96106
{
97107
return true;
98108
}

0 commit comments

Comments
 (0)