diff --git a/src/app/(auth)/components/index.tsx b/src/app/(auth)/components/index.tsx index d042b330..bd2a1ae1 100644 --- a/src/app/(auth)/components/index.tsx +++ b/src/app/(auth)/components/index.tsx @@ -3,13 +3,14 @@ import { startTransition, useEffect, useRef, useState } from "react" import styles from "./auth.module.css" import Link from "../../components/link" -import { getSession, signIn } from "next-auth/react" +import { signIn } from "next-auth/react" import Input from "@components/input" import Button from "@components/button" import { GitHub } from "react-feather" import { useToasts } from "@components/toasts" import { useRouter, useSearchParams } from "next/navigation" import Note from "@components/note" + const Auth = ({ page, requiresServerPassword, diff --git a/src/app/(auth)/signin/page.tsx b/src/app/(auth)/signin/page.tsx index 6e3fae90..05aa83bc 100644 --- a/src/app/(auth)/signin/page.tsx +++ b/src/app/(auth)/signin/page.tsx @@ -1,7 +1,7 @@ import config from "@lib/config" import Auth from "../components" -export function isGithubEnabled() { +function isGithubEnabled() { return config.github_client_id.length && config.github_client_secret.length ? true : false } diff --git a/src/app/(auth)/signup/page.tsx b/src/app/(auth)/signup/page.tsx index 5cd1962f..f0e631d4 100644 --- a/src/app/(auth)/signup/page.tsx +++ b/src/app/(auth)/signup/page.tsx @@ -1,11 +1,15 @@ import Auth from "../components" import { getRequiresPasscode } from "pages/api/auth/requires-passcode" -import { isGithubEnabled } from "../signin/page" +import config from "@lib/config" const getPasscode = async () => { return await getRequiresPasscode() } +function isGithubEnabled() { + return config.github_client_id.length && config.github_client_secret.length ? true : false +} + export default async function SignUpPage() { const requiresPasscode = await getPasscode() return