Skip to content

Commit 6799620

Browse files
committed
Github Login
1 parent 3f65fc1 commit 6799620

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

Thirdweb.Console/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@
329329

330330
#region InAppWallet - OAuth
331331

332-
// var inAppWalletOAuth = await InAppWallet.Create(client: client, authProvider: AuthProvider.Coinbase);
332+
// var inAppWalletOAuth = await InAppWallet.Create(client: client, authProvider: AuthProvider.Github);
333333
// if (!await inAppWalletOAuth.IsConnected())
334334
// {
335335
// _ = await inAppWalletOAuth.LoginWithOauth(

Thirdweb/Thirdweb.Wallets/InAppWallet/EcosystemWallet/EcosystemWallet.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ public static async Task<EcosystemWallet> Create(
9494
AuthProvider.Guest => "Guest",
9595
AuthProvider.X => "X",
9696
AuthProvider.Coinbase => "Coinbase",
97+
AuthProvider.Github => "Github",
9798
AuthProvider.Default => string.IsNullOrEmpty(email) ? "Phone" : "Email",
9899
_ => throw new ArgumentException("Invalid AuthProvider"),
99100
};
@@ -349,6 +350,7 @@ public override async Task<List<LinkedAccount>> LinkAccount(
349350
case "Line":
350351
case "X":
351352
case "Coinbase":
353+
case "Github":
352354
serverRes = await ecosystemWallet.PreAuth_OAuth(isMobile ?? false, browserOpenAction, mobileRedirectScheme, browser).ConfigureAwait(false);
353355
break;
354356
default:

Thirdweb/Thirdweb.Wallets/InAppWallet/InAppWallet.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ public enum AuthProvider
2424
Line,
2525
Guest,
2626
X,
27-
Coinbase
27+
Coinbase,
28+
Github
2829
}
2930

3031
public struct LinkedAccount
@@ -107,6 +108,7 @@ public static async Task<InAppWallet> Create(
107108
Thirdweb.AuthProvider.Guest => "Guest",
108109
Thirdweb.AuthProvider.X => "X",
109110
Thirdweb.AuthProvider.Coinbase => "Coinbase",
111+
Thirdweb.AuthProvider.Github => "Github",
110112
Thirdweb.AuthProvider.Default => string.IsNullOrEmpty(email) ? "Phone" : "Email",
111113
_ => throw new ArgumentException("Invalid AuthProvider"),
112114
};
@@ -238,6 +240,7 @@ public override async Task<List<LinkedAccount>> LinkAccount(
238240
case "Line":
239241
case "X":
240242
case "Coinbase":
243+
case "Github":
241244
serverRes = await inAppWallet.PreAuth_OAuth(isMobile ?? false, browserOpenAction, mobileRedirectScheme, browser).ConfigureAwait(false);
242245
break;
243246
default:

0 commit comments

Comments
 (0)