Skip to content
This repository was archived by the owner on Sep 4, 2024. It is now read-only.

Commit 9918ab3

Browse files
committed
Removes loginWithMagicLink
1 parent 19f9d3e commit 9918ab3

File tree

2 files changed

+2
-24
lines changed

2 files changed

+2
-24
lines changed

link.magic.unity.sdk/Prefabs/Scripts/MagicUnityButton.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ void Update()
2222
public async void Login()
2323
{
2424
Magic magic = Magic.Instance;
25-
var token = await magic.Auth.LoginWithMagicLink("jerry+unity@magic.link");
25+
var token = await magic.Auth.LoginWithEmailOtp("hiro@magic.link");
2626
result.text = $"token {token}";
2727
}
2828

link.magic.unity.sdk/Scripts/Modules/AuthModule.cs

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,6 @@ internal AuthModule(RpcProvider provider) : base(provider)
1111
Provider = provider;
1212
}
1313

14-
public async Task<string> LoginWithMagicLink(string email, bool showUI = true)
15-
{
16-
var config = new LoginWithMagicLinkConfiguration(email, showUI);
17-
return await SendToProviderWithConfig<LoginWithMagicLinkConfiguration, string>(config,
18-
nameof(AuthMethod.magic_auth_login_with_magic_link)
19-
);
20-
}
21-
2214
public async Task<string> LoginWithSms(string phoneNumber)
2315
{
2416
var config = new LoginWithSmsConfiguration(phoneNumber);
@@ -35,19 +27,6 @@ public async Task<string> LoginWithEmailOtp(string email)
3527
}
3628

3729

38-
[Serializable]
39-
internal class LoginWithMagicLinkConfiguration : BaseConfiguration
40-
{
41-
public bool showUI;
42-
public string email;
43-
44-
public LoginWithMagicLinkConfiguration(string email, bool showUI = true)
45-
{
46-
this.showUI = showUI;
47-
this.email = email;
48-
}
49-
}
50-
5130
[Serializable]
5231
internal class LoginWithSmsConfiguration : BaseConfiguration
5332
{
@@ -74,8 +53,7 @@ public LoginWithEmailOtpConfiguration(string email)
7453

7554
internal enum AuthMethod
7655
{
77-
magic_auth_login_with_magic_link,
7856
magic_auth_login_with_sms,
7957
magic_auth_login_with_email_otp
8058
}
81-
}
59+
}

0 commit comments

Comments
 (0)