Skip to content

Commit 1f440d0

Browse files
authored
Add Epic Games as new auth provider (#8343)
1 parent 3a0aac4 commit 1f440d0

File tree

19 files changed

+64
-3
lines changed

19 files changed

+64
-3
lines changed

.changeset/beige-candles-happen.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
Added Epic Games Authentication

apps/dashboard/src/@/api/team/ecosystems.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ export type AuthOption =
2121
| "steam"
2222
| "apple"
2323
| "coinbase"
24-
| "line";
24+
| "line"
25+
| "epic";
2526

2627
export type Ecosystem = {
2728
name: string;

apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/configuration/components/client/auth-options-form.client.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ const authOptions = [
5858
"apple",
5959
"coinbase",
6060
"line",
61+
"epic",
6162
] as const satisfies AuthOption[];
6263

6364
type AuthOptionsFormData = {

apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/(sidebar)/wallets/analytics/chart/InAppWalletUsersChartCard.stories.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ const authMethodsToPickFrom: InAppWalletAuth[] = [
8787
"line",
8888
"x",
8989
"tiktok",
90+
"epic",
9091
"coinbase",
9192
"farcaster",
9293
"telegram",

apps/playground-web/src/app/wallets/sign-in/components/InAppWalletFormGroup.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const allInAppWalletLoginMethods: InAppWalletAuth[] = [
2020
"line",
2121
"x",
2222
"tiktok",
23+
"epic",
2324
"facebook",
2425
"apple",
2526
"coinbase",

apps/portal/src/components/Document/AuthList.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const authOptions: InAppWalletAuth[] = [
1515
"facebook",
1616
"x",
1717
"tiktok",
18+
"epic",
1819
"discord",
1920
"telegram",
2021
"twitch",

apps/portal/src/components/Document/AuthMethodsTabs.tsx

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ type AuthMethod =
2929
| "telegram"
3030
| "farcaster"
3131
| "github"
32+
| "line"
33+
| "tiktok"
34+
| "epic"
3235
| "passkey"
3336
| "wallet"
3437
| "guest"
@@ -55,6 +58,9 @@ const authMethods: { id: AuthMethod; label: string; description: string }[] = [
5558
{ id: "telegram", label: "Telegram", description: "Telegram OAuth" },
5659
{ id: "farcaster", label: "Farcaster", description: "Farcaster OAuth" },
5760
{ id: "github", label: "GitHub", description: "GitHub OAuth" },
61+
{ id: "line", label: "Line", description: "Line OAuth" },
62+
{ id: "tiktok", label: "TikTok", description: "TikTok OAuth" },
63+
{ id: "epic", label: "Epic Games", description: "Epic Games OAuth" },
5864
{ id: "passkey", label: "Passkey", description: "WebAuthn passkey" },
5965
{
6066
id: "wallet",
@@ -244,6 +250,9 @@ const account = await wallet.connect({
244250
case "telegram":
245251
case "farcaster":
246252
case "github":
253+
case "line":
254+
case "tiktok":
255+
case "epic":
247256
return (
248257
baseSetup +
249258
`// ${authMethod.charAt(0).toUpperCase() + authMethod.slice(1)} OAuth
@@ -561,6 +570,9 @@ function PrebuiltUIExample() {
561570
case "telegram":
562571
case "farcaster":
563572
case "github":
573+
case "line":
574+
case "tiktok":
575+
case "epic":
564576
return (
565577
baseSetup +
566578
` await wallet.connect({\n client,\n strategy: "${authMethod}",\n });\n` +
@@ -639,7 +651,10 @@ var address = await wallet.LoginWithOtp("123456");`
639651
case "x":
640652
case "telegram":
641653
case "farcaster":
642-
case "github": {
654+
case "github":
655+
case "line":
656+
case "tiktok":
657+
case "epic": {
643658
const providerMap: Record<string, string> = {
644659
google: "Google",
645660
apple: "Apple",
@@ -649,6 +664,9 @@ var address = await wallet.LoginWithOtp("123456");`
649664
telegram: "Telegram",
650665
farcaster: "Farcaster",
651666
github: "Github",
667+
line: "Line",
668+
tiktok: "TikTok",
669+
epic: "Epic",
652670
};
653671
return (
654672
baseSetup +
@@ -746,7 +764,10 @@ var wallet = await ThirdwebManager.Instance.ConnectWallet(options);`
746764
case "x":
747765
case "telegram":
748766
case "farcaster":
749-
case "github": {
767+
case "github":
768+
case "line":
769+
case "tiktok":
770+
case "epic": {
750771
const providerMap: Record<string, string> = {
751772
google: "Google",
752773
apple: "Apple",
@@ -756,6 +777,9 @@ var wallet = await ThirdwebManager.Instance.ConnectWallet(options);`
756777
telegram: "Telegram",
757778
farcaster: "Farcaster",
758779
github: "Github",
780+
line: "Line",
781+
tiktok: "TikTok",
782+
epic: "Epic",
759783
};
760784
return (
761785
baseSetup +

packages/thirdweb/src/react/core/utils/walletIcon.test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ describe("walletIcon", () => {
5555
expect(getSocialIcon("tiktok")).toBe(socialIcons.tiktok);
5656
});
5757

58+
it("should return epic icon", () => {
59+
expect(getSocialIcon("epic")).toBe(socialIcons.epic);
60+
});
61+
5862
it("should return farcaster icon", () => {
5963
expect(getSocialIcon("farcaster")).toBe(socialIcons.farcaster);
6064
});

packages/thirdweb/src/react/core/utils/walletIcon.ts

Lines changed: 5 additions & 0 deletions
Large diffs are not rendered by default.

packages/thirdweb/src/react/native/ui/components/WalletImage.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
APPLE_ICON,
1212
DISCORD_ICON,
1313
EMAIL_ICON,
14+
EPIC_ICON,
1415
FACEBOOK_ICON,
1516
FARCASTER_ICON,
1617
GITHUB_ICON,
@@ -106,6 +107,8 @@ export function getAuthProviderImage(authProvider: string | null): string {
106107
return X_ICON;
107108
case "tiktok":
108109
return TIKTOK_ICON;
110+
case "epic":
111+
return EPIC_ICON;
109112
case "farcaster":
110113
return FARCASTER_ICON;
111114
case "telegram":

0 commit comments

Comments
 (0)