Skip to content

Commit 9f9b67d

Browse files
committed
[Dashboard] Feature: Adds github as a login option (#5411)
CNCT-2357 <!-- start pr-codex --> --- ## PR-Codex overview This PR introduces wallet integration into the login functionality of the application, allowing users to connect using various wallet options. ### Detailed summary - Added wallet integration by importing `createWallet` and `inAppWallet` from `thirdweb/wallets`. - Defined a `wallets` array containing multiple wallet options including `inAppWallet` and various `createWallet` instances. - Updated the `CustomConnectEmbed` component to utilize the new `wallets` array for authentication. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
1 parent 24a53e3 commit 9f9b67d

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

apps/dashboard/src/app/login/page.tsx

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,32 @@ import { useTheme } from "next-themes";
77
import { useSearchParams } from "next/navigation";
88
import { Suspense, useEffect, useState } from "react";
99
import { ConnectEmbed } from "thirdweb/react";
10+
import { createWallet, inAppWallet } from "thirdweb/wallets";
1011
import { ThirdwebMiniLogo } from "../components/ThirdwebMiniLogo";
1112
import { getSDKTheme } from "../components/sdk-component-theme";
1213
import { doLogin, doLogout, getLoginPayload, isLoggedIn } from "./auth-actions";
1314

15+
const wallets = [
16+
inAppWallet({
17+
auth: {
18+
options: [
19+
"google",
20+
"apple",
21+
"facebook",
22+
"github",
23+
"email",
24+
"phone",
25+
"passkey",
26+
],
27+
},
28+
}),
29+
createWallet("io.metamask"),
30+
createWallet("com.coinbase.wallet"),
31+
createWallet("io.rabby"),
32+
createWallet("me.rainbow"),
33+
createWallet("io.zerion.wallet"),
34+
];
35+
1436
export default function LoginPage() {
1537
return (
1638
<div className="relative grid h-screen place-items-center bg-muted/30">
@@ -74,6 +96,7 @@ function CustomConnectEmmbed() {
7496
return isLoggedInResult;
7597
},
7698
}}
99+
wallets={wallets}
77100
client={client}
78101
modalSize={isLG ? "wide" : "compact"}
79102
theme={getSDKTheme(theme === "light" ? "light" : "dark")}

0 commit comments

Comments
 (0)