Skip to content

Commit 7970e46

Browse files
committed
feat: add more fields in WhiteLabelData.kt and MfaSettings.kt in Web3AuthOptions.kt
Signed-off-by: Gaurav Goel <[email protected]>
1 parent 7da9951 commit 7970e46

File tree

7 files changed

+79
-5
lines changed

7 files changed

+79
-5
lines changed

Assets/Plugins/Web3AuthSDK/Samples/Web3AuthSample.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ void Start()
5454
{
5555
whiteLabel = new WhiteLabelData()
5656
{
57-
name = "Web3Auth Sample App",
57+
appName = "Web3Auth Sample App",
5858
logoLight = null,
5959
logoDark = null,
60-
defaultLanguage = "en",
61-
dark = true,
60+
defaultLanguage = Language.EN.ToString().ToLower(),
61+
mode = ThemeModes.LIGHT.ToString().ToLower(),
6262
theme = new Dictionary<string, string>
6363
{
6464
{ "primary", "#123456" }
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using System.Collections.Generic;
2+
3+
public class MfaSetting
4+
{
5+
public bool? enable { get; set; }
6+
public int priority { get; set; }
7+
public bool? mandatory { get; set; }
8+
9+
// Constructor
10+
public MfaSetting(bool? enable, int priority, bool? mandatory)
11+
{
12+
enable = enable;
13+
priority = priority;
14+
mandatory = mandatory;
15+
}
16+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
public class MfaSettings
2+
{
3+
private MfaSetting deviceShareFactor;
4+
private MfaSetting backUpShareFactor;
5+
private MfaSetting socialBackupFactor;
6+
private MfaSetting passwordFactor;
7+
8+
public MfaSetting DeviceShareFactor
9+
{
10+
get { return deviceShareFactor; }
11+
set { deviceShareFactor = value; }
12+
}
13+
14+
public MfaSetting BackUpShareFactor
15+
{
16+
get { return backUpShareFactor; }
17+
set { backUpShareFactor = value; }
18+
}
19+
20+
public MfaSetting SocialBackupFactor
21+
{
22+
get { return socialBackupFactor; }
23+
set { socialBackupFactor = value; }
24+
}
25+
26+
public MfaSetting PasswordFactor
27+
{
28+
get { return passwordFactor; }
29+
set { passwordFactor = value; }
30+
}
31+
32+
// Constructors
33+
public MfaSettings(
34+
MfaSetting deviceShareFactor = null,
35+
MfaSetting backUpShareFactor = null,
36+
MfaSetting socialBackupFactor = null,
37+
MfaSetting passwordFactor = null)
38+
{
39+
deviceShareFactor = deviceShareFactor;
40+
backUpShareFactor = backUpShareFactor;
41+
socialBackupFactor = socialBackupFactor;
42+
passwordFactor = passwordFactor;
43+
}
44+
}

Assets/Plugins/Web3AuthSDK/Types/UserInfo.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@
1111
public string idToken { get; set; }
1212
public string oAuthIdToken { get; set; }
1313
public string oAuthAccessToken { get; set; }
14+
public bool isMfaEnabled { get; set; }
1415
}

Assets/Plugins/Web3AuthSDK/Types/Web3AuthOptions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ public string sdkUrl {
2424
public Dictionary<string, LoginConfigItem> loginConfig { get; set; }
2525
public bool? useCoreKitKey { get; set; } = false;
2626
public Web3Auth.ChainNamespace? chainNamespace { get; set; } = Web3Auth.ChainNamespace.EIP155;
27+
public MfaSettings mfaSettings { get; set; } = null;
2728
}
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
using System.Collections.Generic;
22

33
public class WhiteLabelData {
4-
public string name { get; set; }
4+
public string appName { get; set; }
55
public string logoLight { get; set; }
66
public string logoDark { get; set; }
77
public string defaultLanguage { get; set; } = "en";
8-
public bool dark { get; set; } = false;
8+
public string mode { get; set; } = "light";
99
public Dictionary<string, string> theme { get; set; }
10+
public string? appUrl { get; set; }
11+
public bool? useLogoLoader { get; set; } = false;
1012
}

Assets/Plugins/Web3AuthSDK/Web3Auth.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@ public enum BuildEnv
2626
PRODUCTION, STAGING, TESTING
2727
}
2828

29+
public enum ThemeModes
30+
{
31+
LIGHT, DARK, AUTO
32+
}
33+
34+
public enum Language
35+
{
36+
EN, DE, JA, KO, ZH, ES, FR, PT, NL
37+
}
38+
2939
private Web3AuthOptions web3AuthOptions;
3040
private Dictionary<string, object> initParams;
3141

0 commit comments

Comments
 (0)