♻️ Move auth

This commit is contained in:
Luke Vella 2024-10-31 22:32:18 +00:00
parent c0c363ca5f
commit 7465550c5d
No known key found for this signature in database
GPG key ID: 469CAD687F0D784C
9 changed files with 9 additions and 9 deletions

View file

@ -15,11 +15,11 @@ import GoogleProvider from "next-auth/providers/google";
import { Provider } from "next-auth/providers/index";
import { posthog } from "@/app/posthog";
import { CustomPrismaAdapter } from "@/auth/custom-prisma-adapter";
import { mergeGuestsIntoUser } from "@/auth/merge-user";
import { env } from "@/env";
import type { RegistrationTokenPayload } from "@/trpc/types";
import { absoluteUrl } from "@/utils/absolute-url";
import { CustomPrismaAdapter } from "@/utils/auth/custom-prisma-adapter";
import { mergeGuestsIntoUser } from "@/utils/auth/merge-user";
import { getEmailClient } from "@/utils/emails";
import { getValueByPath } from "@/utils/get-value-by-path";
import { generateOtp, randomid } from "@/utils/nanoid";

View file

@ -2,7 +2,7 @@ import { prisma } from "@rallly/database";
import { GetServerSideProps } from "next";
import type { DisableNotificationsPayload } from "@/trpc/types";
import { getServerSession } from "@/utils/auth";
import { getServerSession } from "@/auth";
import { decryptToken } from "@/utils/session";
const Page = () => {

View file

@ -1,13 +1,13 @@
import type { NextApiRequest, NextApiResponse } from "next";
import { posthogApiHandler } from "@/app/posthog";
import { AuthApiRoute } from "@/utils/auth";
import { AuthApiRoute } from "@/auth";
import { composeApiHandlers } from "@/utils/next";
export default async function auth(req: NextApiRequest, res: NextApiResponse) {
if (req.method === "HEAD") {
res.status(200).end();
res.setHeader('Content-Length', '0');
res.setHeader("Content-Length", "0");
} else {
return composeApiHandlers(AuthApiRoute, posthogApiHandler)(req, res);
}

View file

@ -4,7 +4,7 @@ import { NextApiRequest, NextApiResponse } from "next";
import { z } from "zod";
import { absoluteUrl } from "@/utils/absolute-url";
import { getServerSession } from "@/utils/auth";
import { getServerSession } from "@/auth";
export const config = {
edge: true,

View file

@ -4,7 +4,7 @@ import { NextApiRequest, NextApiResponse } from "next";
import { z } from "zod";
import { absoluteUrl } from "@/utils/absolute-url";
import { getServerSession } from "@/utils/auth";
import { getServerSession } from "@/auth";
const inputSchema = z.object({
session_id: z.string().optional(),

View file

@ -4,7 +4,7 @@ import { createNextApiHandler } from "@trpc/server/adapters/next";
import { posthogApiHandler } from "@/app/posthog";
import { AppRouter, appRouter } from "@/trpc/routers";
import { getServerSession } from "@/utils/auth";
import { getServerSession } from "@/auth";
import { getEmailClient } from "@/utils/emails";
import { composeApiHandlers } from "@/utils/next";

View file

@ -2,7 +2,7 @@ import { prisma } from "@rallly/database";
import { z } from "zod";
import { posthog } from "@/app/posthog";
import { isEmailBlocked } from "@/utils/auth";
import { isEmailBlocked } from "@/auth";
import { generateOtp } from "@/utils/nanoid";
import { createToken, decryptToken } from "@/utils/session";