Progmasoft Git

progmaweb

The site and account service of Progmasoft: a Next.js frontend and an ASP.NET Core API.

Clonegit clone https://git.progmasoft.com/progmaweb

mainroot / apps / web / app / login / page.tsx

1.2 KiB · Raw · Log

// SPDX-FileCopyrightText: 2026 Progmasoft <support@progmasoft.com>
// SPDX-License-Identifier: AGPL-3.0-or-later

import type { Metadata } from "next";
import { AccountShell } from "@/components/AccountShell";
import { AuthForm } from "@/components/AuthForm";
import { getLocale } from "@/lib/locale.server";
import { getMessages } from "@/lib/localization";

export async function generateMetadata(): Promise<Metadata> {
  const { metadata } = getMessages(await getLocale());
  return {
    title: metadata.loginTitle,
    robots: { index: false, follow: false },
  };
}

interface LoginPageProps {
  searchParams: Promise<{ google?: string }>;
}

export default async function LoginPage({ searchParams }: LoginPageProps) {
  const { google } = await searchParams;
  const locale = await getLocale();
  const { account, auth } = getMessages(locale);
  const initialMessage =
    google === "failed" ? auth.googleSignInFailed : undefined;

  return (
    <AccountShell
      eyebrow={account.loginEyebrow}
      title={account.loginTitle}
      description={account.loginDescription}
      locale={locale}
    >
      <AuthForm initialMessage={initialMessage} locale={locale} mode="login" />
    </AccountShell>
  );
}