diff --git a/apps/dashboard/src/app/login/LoginPage.tsx b/apps/dashboard/src/app/login/LoginPage.tsx
index 9ccc1a0dcc2..cfba0ac2f09 100644
--- a/apps/dashboard/src/app/login/LoginPage.tsx
+++ b/apps/dashboard/src/app/login/LoginPage.tsx
@@ -24,7 +24,7 @@ const LazyOnboardingUI = lazy(
() => import("./onboarding/on-boarding-ui.client"),
);
-const wallets = [
+const loginOptions = [
inAppWallet({
auth: {
options: [
@@ -45,9 +45,27 @@ const wallets = [
createWallet("io.zerion.wallet"),
];
+const inAppWalletLoginOptions = [
+ inAppWallet({
+ auth: {
+ options: [
+ "google",
+ "apple",
+ "facebook",
+ "github",
+ "email",
+ "phone",
+ "passkey",
+ "wallet",
+ ],
+ },
+ }),
+];
+
export function LoginAndOnboardingPage(props: {
account: Account | undefined;
redirectPath: string;
+ loginWithInAppWallet: boolean;
}) {
return (
@@ -91,6 +109,7 @@ export function LoginAndOnboardingPage(props: {
);
@@ -99,6 +118,7 @@ export function LoginAndOnboardingPage(props: {
export function LoginAndOnboardingPageContent(props: {
account: Account | undefined;
redirectPath: string;
+ loginWithInAppWallet: boolean;
}) {
return (
@@ -114,6 +134,7 @@ export function LoginAndOnboardingPageContent(props: {
@@ -139,6 +160,7 @@ function LoadingCard() {
function PageContent(props: {
redirectPath: string;
account: Account | undefined;
+ loginWithInAppWallet: boolean;
}) {
const [screen, setScreen] = useState<
| { id: "login" }
@@ -190,7 +212,12 @@ function PageContent(props: {
}
if (connectionStatus !== "connected" || screen.id === "login") {
- return
;
+ return (
+
+ );
}
if (screen.id === "onboarding") {
@@ -215,6 +242,7 @@ function PageContent(props: {
function CustomConnectEmbed(props: {
onLogin: () => void;
+ loginWithInAppWallet: boolean;
}) {
const { theme } = useTheme();
const client = useThirdwebClient();
@@ -257,7 +285,9 @@ function CustomConnectEmbed(props: {
return isLoggedInResult;
},
}}
- wallets={wallets}
+ wallets={
+ props.loginWithInAppWallet ? inAppWalletLoginOptions : loginOptions
+ }
client={client}
modalSize="wide"
theme={getSDKTheme(theme === "light" ? "light" : "dark")}
diff --git a/apps/dashboard/src/app/login/page.tsx b/apps/dashboard/src/app/login/page.tsx
index 1364df759bc..8275995b0a5 100644
--- a/apps/dashboard/src/app/login/page.tsx
+++ b/apps/dashboard/src/app/login/page.tsx
@@ -4,10 +4,13 @@ import { isValidEncodedRedirectPath } from "./isValidEncodedRedirectPath";
export default async function Page(props: {
searchParams: Promise<{
- next?: string;
+ next: string | string[] | undefined;
+ "in-app-wallet": string | string[] | undefined;
}>;
}) {
- const nextPath = (await props.searchParams).next;
+ const searchParams = await props.searchParams;
+ const nextPath =
+ typeof searchParams.next === "string" ? searchParams.next : undefined;
const account = await getRawAccount();
// don't redirect away from login page if authToken is already present and onboarding is done
@@ -20,6 +23,10 @@ export default async function Page(props: {
nextPath && isValidEncodedRedirectPath(nextPath) ? nextPath : "/team";
return (
-
+
);
}
diff --git a/apps/dashboard/src/app/nebula-app/login/NebulaLoginPage.tsx b/apps/dashboard/src/app/nebula-app/login/NebulaLoginPage.tsx
index b672a1fecea..b2d39305553 100644
--- a/apps/dashboard/src/app/nebula-app/login/NebulaLoginPage.tsx
+++ b/apps/dashboard/src/app/nebula-app/login/NebulaLoginPage.tsx
@@ -53,6 +53,7 @@ export function NebulaLoginPage(props: {
{showPage === "connect" && (