Connect, collaborate, and grow with a community of TypeScript developers
feature: upgrade nextauth to v5 (#1105)
rbrtj1bad0621f069
diff --git a/apps/admin/src/app/api/auth/[...nextauth]/route.ts b/apps/admin/src/app/api/auth/[...nextauth]/route.tsindex 67c59149..36cd532e 100644--- a/apps/admin/src/app/api/auth/[...nextauth]/route.ts+++ b/apps/admin/src/app/api/auth/[...nextauth]/route.ts@@ -1,6 +1 @@-import NextAuth from '@repo/auth/next-auth';-import { authOptions } from '@repo/auth/server';--const handler = NextAuth(authOptions);--export { handler as GET, handler as POST };+export { GET, POST } from '@repo/auth/server';diff --git a/apps/admin/src/app/dashboard/reports/[id]/_actions.ts b/apps/admin/src/app/dashboard/reports/[id]/_actions.tsindex cbbd757c..a4871537 100644--- a/apps/admin/src/app/dashboard/reports/[id]/_actions.ts+++ b/apps/admin/src/app/dashboard/reports/[id]/_actions.ts@@ -1,6 +1,5 @@'use server';--import { getServerAuthSession } from '@repo/auth/server';+import { auth } from '@repo/auth/server';import { prisma } from '@repo/db';import { type Prisma, type Report } from '@repo/db/types';import { cache } from 'react';@@ -77,7 +76,7 @@ export async function getBannedUsers() {* @returns*/export async function banChallenge(challengeId: number, reportId: number) {- const session = await getServerAuthSession();+ const session = await auth();await prisma.$transaction([prisma.challenge.update({where: {@@ -107,7 +106,7 @@ export async function banChallenge(challengeId: number, reportId: number) {* @returns*/export async function dismissReport(reportId: number) {- const session = await getServerAuthSession();+ const session = await auth();return prisma.report.update({where: {id: reportId,@@ -152,7 +151,7 @@ export async function deleteSolution(solutionId: number, reportId: number) {* @returns*/export async function banUser(userId: string, reportId: number, banReason?: string) {- const session = await getServerAuthSession();+ const session = await auth();assertAdmin(session);diff --git a/apps/admin/src/app/dashboard/users/_actions.ts b/apps/admin/src/app/dashboard/users/_actions.tsindex 9f824cbf..e75ee2d0 100644--- a/apps/admin/src/app/dashboard/users/_actions.ts+++ b/apps/admin/src/app/dashboard/users/_actions.ts@@ -1,6 +1,6 @@'use server';-import { getServerAuthSession } from '@repo/auth/server';+import { auth } from '@repo/auth/server';import { prisma } from '@repo/db';import { revalidatePath } from 'next/cache';@@ -20,7 +20,7 @@ export async function getBannedUsers() {* @returns*/export async function banUser(userId: string, reportId: number, banReason?: string) {- const session = await getServerAuthSession();+ const session = await auth();await prisma.$transaction([prisma.user.update({diff --git a/apps/admin/src/app/page.tsx b/apps/admin/src/app/page.tsxindex 5beb8f14..7b45c861 100644--- a/apps/admin/src/app/page.tsx+++ b/apps/admin/src/app/page.tsx@@ -1,10 +1,10 @@-import { getServerAuthSession } from '@repo/auth/server';+import { auth } from '@repo/auth/server';import { RoleTypes } from '@repo/db/types';import { Lock } from '@repo/ui/icons';import { redirect } from 'next/navigation';async function Admin() {- const session = await getServerAuthSession();+ const session = await auth();const roles = session?.user.role ?? [];const isMod = roles.includes(RoleTypes.MODERATOR);diff --git a/apps/web/src/app/[locale]/(playgrounds)/challenge-playground/layout.tsx b/apps/web/src/app/[locale]/(playgrounds)/challenge-playground/layout.tsxindex 0dff7957..9c5d676f 100644--- a/apps/web/src/app/[locale]/(playgrounds)/challenge-playground/layout.tsx+++ b/apps/web/src/app/[locale]/(playgrounds)/challenge-playground/layout.tsx@@ -1,11 +1,11 @@import { ForceRenderUntilClient } from '@repo/ui/components/force-render-until-client';-import { getServerAuthSession } from '@repo/auth/server';import { isAdminOrModerator } from '~/utils/auth-guards';import { redirect } from 'next/navigation';import { ChallengePlaygroundLayoutWrapper } from './challenge-playground-layout-wrapper';+import { auth } from '@repo/auth/server';export default async function LayoutData({ children }: { children: React.ReactNode }) {- const session = await getServerAuthSession();+ const session = await auth();if (!isAdminOrModerator(session)) {return redirect('/');}diff --git a/apps/web/src/app/[locale]/(playgrounds)/challenge-playground/page.tsx b/apps/web/src/app/[locale]/(playgrounds)/challenge-playground/page.tsxindex 391a164b..4aeffdf1 100644--- a/apps/web/src/app/[locale]/(playgrounds)/challenge-playground/page.tsx+++ b/apps/web/src/app/[locale]/(playgrounds)/challenge-playground/page.tsx@@ -1,10 +1,10 @@-import { getServerAuthSession } from '@repo/auth/server';import { notFound } from 'next/navigation';import { isAdminOrModerator } from '~/utils/auth-guards';import { Description } from './description';+import { auth } from '@repo/auth/server';export default async function ChallengePlaygroundPage() {- const session = await getServerAuthSession();+ const session = await auth();if (!isAdminOrModerator(session)) {return notFound();diff --git a/apps/web/src/app/[locale]/(profile)/[username]/_components/dashboard/_actions.ts b/apps/web/src/app/[locale]/(profile)/[username]/_components/dashboard/_actions.tsindex 048aee62..5990303a 100644--- a/apps/web/src/app/[locale]/(profile)/[username]/_components/dashboard/_actions.ts+++ b/apps/web/src/app/[locale]/(profile)/[username]/_components/dashboard/_actions.ts@@ -1,7 +1,7 @@'use server';import { prisma } from '@repo/db';-import { getServerAuthSession } from '@repo/auth/server';+import { auth } from '@repo/auth/server';import type { DIFFICULTIES } from './challenges-progress';export type HistoricalChallenge = Awaited<ReturnType<typeof getChallengeHistoryByCategory>>[0];@@ -68,7 +68,7 @@ export async function getChallengeHistoryByCategory(type: HistoryType, userId: s}export async function getSolvedChallenges() {- const session = await getServerAuthSession();+ const session = await auth();const successfulSubmissions = await prisma.submission.findMany({where: {diff --git a/apps/web/src/app/[locale]/(profile)/[username]/_components/profile.tsx b/apps/web/src/app/[locale]/(profile)/[username]/_components/profile.tsxindex 75ed1e46..383e3bc3 100644--- a/apps/web/src/app/[locale]/(profile)/[username]/_components/profile.tsx+++ b/apps/web/src/app/[locale]/(profile)/[username]/_components/profile.tsx@@ -2,7 +2,7 @@ import { prisma } from '@repo/db';import type { Metadata } from 'next';import { notFound } from 'next/navigation';import { Dashboard } from './dashboard';-import { getServerAuthSession } from '@repo/auth/server';+import { auth } from '@repo/auth/server';interface Props {username: string;@@ -36,7 +36,7 @@ export async function Profile({ username: usernameFromQuery, children }: Props)if (!user) return notFound();- const session = await getServerAuthSession();+ const session = await auth();const isOwnProfile = session?.user.id === user.id;return (diff --git a/apps/web/src/app/[locale]/(profile)/[username]/bookmarks/page.tsx b/apps/web/src/app/[locale]/(profile)/[username]/bookmarks/page.tsxindex 4547dc6b..7dae74a1 100644--- a/apps/web/src/app/[locale]/(profile)/[username]/bookmarks/page.tsx+++ b/apps/web/src/app/[locale]/(profile)/[username]/bookmarks/page.tsx@@ -1,4 +1,3 @@-import { getServerAuthSession } from '@repo/auth/server';import { prisma } from '@repo/db';import {Card,@@ -12,6 +11,7 @@ import { withUnstableCache } from '~/utils/withUnstableCache';import { createCacheKeyForBookmarksTab } from '../../../challenge/_components/bookmark.action';import { DataTable } from '@repo/ui/components/data-table';import { bookmarkedChallengedColumns } from './_components/bookmarked-challenges-columns';+import { auth } from '@repo/auth/server';interface Props {params: {@@ -20,7 +20,7 @@ interface Props {}export default async function BookmarksPage({ params: { username: usernameFromQuery } }: Props) {- const session = await getServerAuthSession();+ const session = await auth();const [, username] = decodeURIComponent(usernameFromQuery).split('@');if (!username || session?.user.name !== username) return notFound();diff --git a/apps/web/src/app/[locale]/(profile)/[username]/completed/page.tsx b/apps/web/src/app/[locale]/(profile)/[username]/completed/page.tsxindex 0d37c8c2..8be6d1a3 100644--- a/apps/web/src/app/[locale]/(profile)/[username]/completed/page.tsx+++ b/apps/web/src/app/[locale]/(profile)/[username]/completed/page.tsx@@ -1,4 +1,3 @@-import { getServerAuthSession } from '@repo/auth/server';import { prisma } from '@repo/db';import {Card,@@ -12,6 +11,7 @@ import { createCompletedSubmissionCacheKey } from '~/app/[locale]/challenge/[sluimport { withUnstableCache } from '~/utils/withUnstableCache';import { getChallengeHistoryByCategory } from '../_components/dashboard/_actions';import ChallengeHistory from '../_components/dashboard/challenge-history';+import { auth } from '@repo/auth/server';interface Props {params: {@@ -20,7 +20,7 @@ interface Props {}export default async function CompletedPage({ params: { username: usernameFromQuery } }: Props) {- const session = await getServerAuthSession();+ const session = await auth();const [, username] = decodeURIComponent(usernameFromQuery).split('@');if (!username || session?.user.name !== username) return notFound();diff --git a/apps/web/src/app/[locale]/(profile)/[username]/in-progress/page.tsx b/apps/web/src/app/[locale]/(profile)/[username]/in-progress/page.tsxindex da509aa2..0167f164 100644--- a/apps/web/src/app/[locale]/(profile)/[username]/in-progress/page.tsx+++ b/apps/web/src/app/[locale]/(profile)/[username]/in-progress/page.tsx@@ -1,4 +1,3 @@-import { getServerAuthSession } from '@repo/auth/server';import { prisma } from '@repo/db';import {Card,@@ -12,6 +11,7 @@ import { createInProgressSubmissionCacheKey } from '~/app/[locale]/challenge/[slimport { withUnstableCache } from '~/utils/withUnstableCache';import { getChallengeHistoryByCategory } from '../_components/dashboard/_actions';import ChallengeHistory from '../_components/dashboard/challenge-history';+import { auth } from '@repo/auth/server';interface Props {params: {@@ -20,7 +20,7 @@ interface Props {}export default async function InProgressPage({ params: { username: usernameFromQuery } }: Props) {- const session = await getServerAuthSession();+ const session = await auth();const [, username] = decodeURIComponent(usernameFromQuery).split('@');if (!username || session?.user.name !== username) return notFound();diff --git a/apps/web/src/app/[locale]/(profile)/[username]/shared-solutions/page.tsx b/apps/web/src/app/[locale]/(profile)/[username]/shared-solutions/page.tsxindex 49917a37..fd31d676 100644--- a/apps/web/src/app/[locale]/(profile)/[username]/shared-solutions/page.tsx+++ b/apps/web/src/app/[locale]/(profile)/[username]/shared-solutions/page.tsx@@ -1,4 +1,3 @@-import { getServerAuthSession } from '@repo/auth/server';import { prisma } from '@repo/db';import {Card,@@ -12,6 +11,7 @@ import { notFound } from 'next/navigation';import { withUnstableCache } from '~/utils/withUnstableCache';import { createCacheKeyForSharedSolutionsTab } from '../../../challenge/[slug]/solutions/_components/_actions';import { sharedSolutionsColumns } from './_components/shared-solutions-columns';+import { auth } from '@repo/auth/server';interface Props {params: {@@ -47,7 +47,7 @@ export default async function SharedSolutionsPage({tags: [createCacheKeyForSharedSolutionsTab(user.id)],});- const session = await getServerAuthSession();+ const session = await auth();const isOwnProfile = session?.user.id === user.id;return (diff --git a/apps/web/src/app/[locale]/_components/hero.tsx b/apps/web/src/app/[locale]/_components/hero.tsxindex 576fd8ea..50fd98c8 100644--- a/apps/web/src/app/[locale]/_components/hero.tsx+++ b/apps/web/src/app/[locale]/_components/hero.tsx@@ -4,7 +4,7 @@ import { Balancer } from 'react-wrap-balancer';import { Button } from '@repo/ui/components/button';import { HeroIllustration, BackgroundGrid } from './hero-illustration';import { getScopedI18n } from '~/locales/server';-import { getServerAuthSession } from '@repo/auth/server';+import { auth } from '@repo/auth/server';function TypeHeroLogo3D() {return (@@ -145,7 +145,7 @@ function BeamOfLight() {export async function Hero() {const t = await getScopedI18n('landing.hero');- const session = await getServerAuthSession();+ const session = await auth();return (<section className="-mt-[56px] min-h-[calc(100vh)] overflow-hidden lg:min-h-0 lg:pt-[56px]"><div className="absolute inset-10 -z-30 overflow-hidden rounded-full opacity-70 lg:hidden">diff --git a/apps/web/src/app/[locale]/challenge/[slug]/comments/[commentId]/page.tsx b/apps/web/src/app/[locale]/challenge/[slug]/comments/[commentId]/page.tsxindex 45e87251..bb2a463c 100644--- a/apps/web/src/app/[locale]/challenge/[slug]/comments/[commentId]/page.tsx+++ b/apps/web/src/app/[locale]/challenge/[slug]/comments/[commentId]/page.tsx@@ -1,4 +1,4 @@-import { getServerAuthSession } from '@repo/auth/server';+import { auth } from '@repo/auth/server';import { Comments } from '../../../_components/comments';import { getPreselectedCommentMetadata } from '../../../_components/comments/getCommentRouteData';import { Description } from '../../../_components/description';@@ -12,7 +12,7 @@ interface Props {}export default async function CommentPage({ params: { slug, commentId } }: Props) {- const session = await getServerAuthSession();+ const session = await auth();const { challenge } = await getChallengeRouteData(slug, session);const preselectedCommentMetadata = await getPreselectedCommentMetadata(challenge.id,diff --git a/apps/web/src/app/[locale]/challenge/[slug]/layout.tsx b/apps/web/src/app/[locale]/challenge/[slug]/layout.tsxindex 7f7139b7..ba4e3597 100644--- a/apps/web/src/app/[locale]/challenge/[slug]/layout.tsx+++ b/apps/web/src/app/[locale]/challenge/[slug]/layout.tsx@@ -1,6 +1,6 @@import { ChallengeLayoutWrapper } from '~/app/[locale]/challenge/_components/challenge-layout-wrapper';-import { getServerAuthSession } from '@repo/auth/server';+import { auth } from '@repo/auth/server';import { ForceRenderUntilClient } from '@repo/ui/components/force-render-until-client';import { getChallengeRouteData } from './getChallengeRouteData';@@ -12,7 +12,7 @@ export default async function LayoutData({children: React.ReactNode;params: { slug: string };}) {- const session = await getServerAuthSession();+ const session = await auth();const { challenge, track } = await getChallengeRouteData(slug, session);return (diff --git a/apps/web/src/app/[locale]/challenge/[slug]/page.tsx b/apps/web/src/app/[locale]/challenge/[slug]/page.tsxindex f52955bb..4fbff708 100644--- a/apps/web/src/app/[locale]/challenge/[slug]/page.tsx+++ b/apps/web/src/app/[locale]/challenge/[slug]/page.tsx@@ -1,4 +1,4 @@-import { getServerAuthSession, type Session } from '@repo/auth/server';+import { auth, type Session } from '@repo/auth/server';import { redirect } from 'next/navigation';import { buildMetaForChallenge } from '~/app/metadata';import { getRelativeTime } from '~/utils/relativeTime';@@ -28,7 +28,7 @@ export async function generateMetadata({ params: { slug } }: Props) {export default async function Challenges({ params: { slug } }: Props) {// early access you must be authorized- const session = await getServerAuthSession();+ const session = await auth();const isBeta = await isBetaUser(session);if (!isBeta) {diff --git a/apps/web/src/app/[locale]/challenge/[slug]/solutions/[solutionId]/comments/[commentId]/page.tsx b/apps/web/src/app/[locale]/challenge/[slug]/solutions/[solutionId]/comments/[commentId]/page.tsxindex f109b063..2c4a4b54 100644--- a/apps/web/src/app/[locale]/challenge/[slug]/solutions/[solutionId]/comments/[commentId]/page.tsx+++ b/apps/web/src/app/[locale]/challenge/[slug]/solutions/[solutionId]/comments/[commentId]/page.tsx@@ -1,4 +1,4 @@-import { getServerAuthSession } from '@repo/auth/server';+import { auth } from '@repo/auth/server';import { SolutionDetails } from '~/app/[locale]/challenge/[slug]/solutions/_components/solution-detail';import { Comments } from '~/app/[locale]/challenge/_components/comments';import { getPreselectedSolutionCommentMetadata } from '~/app/[locale]/challenge/_components/comments/getCommentRouteData';@@ -15,7 +15,7 @@ interface Props {export default async function SolutionPageComments({params: { solutionId, commentId, slug },}: Props) {- const session = await getServerAuthSession();+ const session = await auth();const solution = await getSolutionIdRouteData(slug, solutionId, session);const preselectedCommentMetadata = await getPreselectedSolutionCommentMetadata(Number(solutionId),diff --git a/apps/web/src/app/[locale]/challenge/[slug]/solutions/[solutionId]/page.tsx b/apps/web/src/app/[locale]/challenge/[slug]/solutions/[solutionId]/page.tsxindex 081d3f12..2a5796e4 100644--- a/apps/web/src/app/[locale]/challenge/[slug]/solutions/[solutionId]/page.tsx+++ b/apps/web/src/app/[locale]/challenge/[slug]/solutions/[solutionId]/page.tsx@@ -1,6 +1,6 @@import { prisma } from '@repo/db';import { SolutionDetails } from '../_components/solution-detail';-import { getServerAuthSession } from '@repo/auth/server';+import { auth } from '@repo/auth/server';import { Comments } from '~/app/[locale]/challenge/_components/comments';import { getSolutionIdRouteData } from './getSolutionIdRouteData';import { isBetaUser } from '~/utils/server/is-beta-user';@@ -15,7 +15,7 @@ interface Props {export type ChallengeSolution = NonNullable<Awaited<ReturnType<typeof getSolutionIdRouteData>>>;export default async function SolutionPage({ params: { solutionId, slug } }: Props) {- const session = await getServerAuthSession();+ const session = await auth();const isBeta = await isBetaUser(session);if (!isBeta) {diff --git a/apps/web/src/app/[locale]/challenge/[slug]/solutions/_components/_actions.ts b/apps/web/src/app/[locale]/challenge/[slug]/solutions/_components/_actions.tsindex 052bbe43..6dbe2b08 100644--- a/apps/web/src/app/[locale]/challenge/[slug]/solutions/_components/_actions.ts+++ b/apps/web/src/app/[locale]/challenge/[slug]/solutions/_components/_actions.ts@@ -1,5 +1,5 @@'use server';-import { getServerAuthSession } from '@repo/auth/server';+import { auth } from '@repo/auth/server';import { prisma } from '@repo/db';import { revalidateTag } from 'next/cache';import { isAdminOrModerator, isAuthor } from '~/utils/auth-guards';@@ -25,7 +25,7 @@ export const createCacheKeyForSolutions = (slug: string) => `challenge-${slug}-sexport const createCacheKeyForSharedSolutionsTab = (userId: string) => `${userId}-shared-solutions`;export async function updateSolution({ id, description, slug, title }: SolutionUpdateArgs) {- const session = await getServerAuthSession();+ const session = await auth();const solution = await prisma.sharedSolution.findFirstOrThrow({where: {@@ -49,7 +49,7 @@ export async function updateSolution({ id, description, slug, title }: SolutionU}export async function postSolution({ challengeId, description, slug, title, userId }: Args) {- const session = await getServerAuthSession();+ const session = await auth();if (!session) throw new Error('You must be logged in to submit a solution');await prisma.sharedSolution.create({@@ -65,7 +65,7 @@ export async function postSolution({ challengeId, description, slug, title, user}export async function deleteSolution(solutionToDelete: ChallengeSolution) {- const session = await getServerAuthSession();+ const session = await auth();const solution = await prisma.sharedSolution.findFirstOrThrow({where: {id: solutionToDelete.id,@@ -84,7 +84,7 @@ export async function deleteSolution(solutionToDelete: ChallengeSolution) {}export async function pinOrUnpinSolution(id: number, isPinned: boolean, slug: string) {- const session = await getServerAuthSession();+ const session = await auth();if (!isAdminOrModerator(session))throw new Error('You are not authorized to pin/unpin solutions');diff --git a/apps/web/src/app/[locale]/challenge/[slug]/solutions/getSolutionRouteData.ts b/apps/web/src/app/[locale]/challenge/[slug]/solutions/getSolutionRouteData.tsindex 138600ef..f286fc44 100644--- a/apps/web/src/app/[locale]/challenge/[slug]/solutions/getSolutionRouteData.ts+++ b/apps/web/src/app/[locale]/challenge/[slug]/solutions/getSolutionRouteData.ts@@ -1,6 +1,6 @@'use server';import { prisma } from '@repo/db';-import { getServerAuthSession, type Session } from '@repo/auth/server';+import { auth } from '@repo/auth/server';import type { SortKey, SortOrder } from '~/utils/sorting';import { orderBy } from '~/utils/sorting';@@ -18,7 +18,7 @@ export async function getPaginatedSolutions({sortKey?: SortKey;sortOrder?: SortOrder;}) {- const session = await getServerAuthSession();+ const session = await auth();const data = await prisma.challenge.findFirst({where: { slug },select: {diff --git a/apps/web/src/app/[locale]/challenge/[slug]/submissions/[[...catchAll]]/page.tsx b/apps/web/src/app/[locale]/challenge/[slug]/submissions/[[...catchAll]]/page.tsxindex dcc39bf1..796e1b7d 100644--- a/apps/web/src/app/[locale]/challenge/[slug]/submissions/[[...catchAll]]/page.tsx+++ b/apps/web/src/app/[locale]/challenge/[slug]/submissions/[[...catchAll]]/page.tsx@@ -1,4 +1,4 @@-import { getServerAuthSession } from '@repo/auth/server';+import { auth } from '@repo/auth/server';import { prisma } from '@repo/db';import { notFound, redirect } from 'next/navigation';import { cache } from 'react';@@ -19,7 +19,7 @@ export const metadata = {};export default async function SubmissionPage({ params: { slug } }: Props) {- const session = await getServerAuthSession();+ const session = await auth();const isBeta = await isBetaUser(session);if (!isBeta) {diff --git a/apps/web/src/app/[locale]/challenge/_components/comments/comment.action.ts b/apps/web/src/app/[locale]/challenge/_components/comments/comment.action.tsindex f552197a..1507cadc 100644--- a/apps/web/src/app/[locale]/challenge/_components/comments/comment.action.ts+++ b/apps/web/src/app/[locale]/challenge/_components/comments/comment.action.ts@@ -1,6 +1,6 @@'use server';-import { getServerAuthSession } from '@repo/auth/server';+import { auth } from '@repo/auth/server';import { prisma } from '@repo/db';import type { Comment, CommentRoot, PrismaClient } from '@repo/db/types';import { isAdminOrModerator, isAuthor } from '~/utils/auth-guards';@@ -16,7 +16,7 @@ interface CommentToCreate {rootId: number;}export async function addComment(comment: CommentToCreate) {- const session = await getServerAuthSession();+ const session = await auth();if (!session?.user.id) return 'unauthorized';if (comment.text.length === 0) return 'text_is_empty';@@ -39,7 +39,7 @@ export async function addComment(comment: CommentToCreate) {}export async function replyComment(comment: CommentToCreate, parentId: number) {- const session = await getServerAuthSession();+ const session = await auth();if (!session?.user.id) return 'unauthorized';if (comment.text.length === 0) return 'text_is_empty';@@ -63,7 +63,7 @@ export async function replyComment(comment: CommentToCreate, parentId: number) {}export async function updateComment(text: string, id: number) {- const session = await getServerAuthSession();+ const session = await auth();if (!session) return 'unauthorized';if (text.length === 0) return 'text_is_empty';@@ -96,7 +96,7 @@ export async function updateComment(text: string, id: number) {* @returns 'unauthorized' if the user is not authorized, 'invalid_comment' if the comment ID is not provided, or undefined if the comment is successfully deleted.*/export async function deleteComment(comment_id: number) {- const session = await getServerAuthSession();+ const session = await auth();if (!session) return 'unauthorized';if (!comment_id) return 'invalid_comment';diff --git a/apps/web/src/app/[locale]/challenge/_components/comments/getCommentRouteData.ts b/apps/web/src/app/[locale]/challenge/_components/comments/getCommentRouteData.tsindex 97cd8926..1ea327cf 100644--- a/apps/web/src/app/[locale]/challenge/_components/comments/getCommentRouteData.ts+++ b/apps/web/src/app/[locale]/challenge/_components/comments/getCommentRouteData.ts@@ -1,5 +1,5 @@'use server';-import { getServerAuthSession } from '@repo/auth/server';+import { auth } from '@repo/auth/server';import { prisma } from '@repo/db';import type { CommentRoot } from '@repo/db/types';import { orderBy, type SortKey, type SortOrder } from '~/utils/sorting';@@ -118,7 +118,7 @@ export async function getPaginatedComments({sortOrder?: SortOrder;take?: number;}) {- const session = await getServerAuthSession();+ const session = await auth();const totalComments = await getCommentsCount({ rootType, rootId, parentId });diff --git a/apps/web/src/app/[locale]/challenge/increment.action.ts b/apps/web/src/app/[locale]/challenge/increment.action.tsindex 2f9dc276..05aca260 100644--- a/apps/web/src/app/[locale]/challenge/increment.action.ts+++ b/apps/web/src/app/[locale]/challenge/increment.action.ts@@ -1,5 +1,5 @@'use server';-import { getServerAuthSession } from '@repo/auth/server';+import { auth } from '@repo/auth/server';import { prisma } from '@repo/db';import type { VoteType } from '@repo/db/types';@@ -8,7 +8,7 @@ export async function incrementOrDecrementUpvote(rootType: VoteType,shouldIncrement: boolean,) {- const session = await getServerAuthSession();+ const session = await auth();if (!session) {throw new Error('User not authenticated');diff --git a/apps/web/src/app/[locale]/claim/_actions.ts b/apps/web/src/app/[locale]/claim/_actions.tsindex 1872d1a9..ec7889b0 100644--- a/apps/web/src/app/[locale]/claim/_actions.ts+++ b/apps/web/src/app/[locale]/claim/_actions.ts@@ -1,5 +1,5 @@'use server';-import { getServerAuthSession, type Session } from '@repo/auth/server';+import { auth, type Session } from '@repo/auth/server';import { prisma } from '@repo/db';import { redirect } from 'next/navigation';import { claimFormSchema } from './_schema';@@ -8,7 +8,7 @@ import { type FormSchema } from './claim-form';export async function validateToken(claimFormData: FormSchema) {claimFormSchema.parse(claimFormData);- const session = await getServerAuthSession();+ const session = await auth();if (!session) {throw new Error('Not authenticated');diff --git a/apps/web/src/app/[locale]/claim/page.tsx b/apps/web/src/app/[locale]/claim/page.tsxindex 2cdcee0c..fcc7f7d3 100644--- a/apps/web/src/app/[locale]/claim/page.tsx+++ b/apps/web/src/app/[locale]/claim/page.tsx@@ -1,4 +1,4 @@-import { getServerAuthSession, type Session } from '@repo/auth/server';+import { auth } from '@repo/auth/server';import { LoginButton } from '../login/_components/LoginButton';import { ClaimForm, type FormSchema } from './claim-form';import Image from 'next/image';@@ -12,7 +12,7 @@ interface Props {export default async function Claim({ searchParams }: Props) {const token = searchParams?.token;- const session = await getServerAuthSession();+ const session = await auth();if (session && token) {if (await isValidToken(session, { code: token })) {diff --git a/apps/web/src/app/[locale]/explore/_components/explore.action.ts b/apps/web/src/app/[locale]/explore/_components/explore.action.tsindex fceb9388..a649f901 100644--- a/apps/web/src/app/[locale]/explore/_components/explore.action.ts+++ b/apps/web/src/app/[locale]/explore/_components/explore.action.ts@@ -1,6 +1,6 @@'use server';-import { getServerAuthSession } from '@repo/auth/server';+import { auth } from '@repo/auth/server';import { prisma } from '@repo/db';import { Tags, type Difficulty } from '@repo/db/types';@@ -11,7 +11,7 @@ const allTags: Tags[] = Object.values(Tags);* Fetches challenges either by tag or difficulty.*/export async function getChallengesByTagOrDifficulty(str: string, take?: number) {- const session = await getServerAuthSession();+ const session = await auth();const formattedStr = str.trim().toUpperCase();return prisma.challenge.findMany({diff --git a/apps/web/src/app/[locale]/explore/_components/index.tsx b/apps/web/src/app/[locale]/explore/_components/index.tsxindex 957e365a..4bd3100f 100644--- a/apps/web/src/app/[locale]/explore/_components/index.tsx+++ b/apps/web/src/app/[locale]/explore/_components/index.tsx@@ -1,4 +1,4 @@-import { getServerAuthSession } from '@repo/auth/server';+import { auth } from '@repo/auth/server';import { redirect } from 'next/navigation';import { Suspense } from 'react';import { Footsies } from '~/components/footsies';@@ -10,7 +10,7 @@ import { ExploreSectionSkeleton } from './explore-section-skeleton';export const dynamic = 'force-dynamic';export async function Explore() {- const session = await getServerAuthSession();+ const session = await auth();const isBeta = await isBetaUser(session);if (!isBeta) {diff --git a/apps/web/src/app/[locale]/settings/_components/settings.action.ts b/apps/web/src/app/[locale]/settings/_components/settings.action.tsindex 3ab41479..3253c86d 100644--- a/apps/web/src/app/[locale]/settings/_components/settings.action.ts+++ b/apps/web/src/app/[locale]/settings/_components/settings.action.ts@@ -1,6 +1,6 @@'use server';-import { getServerAuthSession } from '@repo/auth/server';+import { auth } from '@repo/auth/server';import { revalidatePath } from 'next/cache';import { prisma } from '@repo/db';import type { ProfileSchema } from './schema';@@ -11,7 +11,7 @@ import { profileSchema } from './schema';* @param profileData*/export async function updateProfile(profileData: ProfileSchema) {- const session = await getServerAuthSession();+ const session = await auth();// 1. Checks that the user is logged inif (!session?.user.id) return { error: 'unauthorized' };diff --git a/apps/web/src/app/[locale]/settings/page.tsx b/apps/web/src/app/[locale]/settings/page.tsxindex a4a1e336..a77f6da5 100644--- a/apps/web/src/app/[locale]/settings/page.tsx+++ b/apps/web/src/app/[locale]/settings/page.tsx@@ -1,4 +1,4 @@-import { getServerAuthSession } from '@repo/auth/server';+import { auth } from '@repo/auth/server';import { prisma } from '@repo/db';import type { Metadata } from 'next';import { Settings } from './_components/settings';@@ -12,7 +12,7 @@ export async function generateMetadata(): Promise<Metadata> {}export default async function SettingsPage() {- const session = await getServerAuthSession();+ const session = await auth();if (!session?.user || !session.user.name) {return null;diff --git a/apps/web/src/app/[locale]/tracks/[slug]/page.tsx b/apps/web/src/app/[locale]/tracks/[slug]/page.tsxindex 09d7990f..a27304dc 100644--- a/apps/web/src/app/[locale]/tracks/[slug]/page.tsx+++ b/apps/web/src/app/[locale]/tracks/[slug]/page.tsx@@ -1,4 +1,4 @@-import { getServerAuthSession } from '@repo/auth/server';+import { auth } from '@repo/auth/server';import { redirect } from 'next/navigation';import { isBetaUser } from '~/utils/server/is-beta-user';import { withUnstableCache } from '~/utils/withUnstableCache';@@ -15,7 +15,7 @@ interface Props {// todo: write a suspense skeleton...export default async function Page({ params }: Props) {- const session = await getServerAuthSession();+ const session = await auth();const isBeta = await isBetaUser(session);if (!isBeta) {diff --git a/apps/web/src/app/[locale]/tracks/_components/index.tsx b/apps/web/src/app/[locale]/tracks/_components/index.tsxindex 51984770..d5eb2f88 100644--- a/apps/web/src/app/[locale]/tracks/_components/index.tsx+++ b/apps/web/src/app/[locale]/tracks/_components/index.tsx@@ -1,4 +1,4 @@-import { getServerAuthSession } from '@repo/auth/server';+import { auth } from '@repo/auth/server';import { redirect } from 'next/navigation';import { isBetaUser } from '~/utils/server/is-beta-user';import { EnrolledTrackSection } from './track-enrolled-section';@@ -7,7 +7,7 @@ import { Footsies } from '~/components/footsies';export async function Tracks() {// early acces you must be authorized- const session = await getServerAuthSession();+ const session = await auth();const isBeta = await isBetaUser(session);if (!isBeta) {diff --git a/apps/web/src/app/[locale]/tracks/_components/track-enrolled-section.tsx b/apps/web/src/app/[locale]/tracks/_components/track-enrolled-section.tsxindex 64bd9f28..1ebd4138 100644--- a/apps/web/src/app/[locale]/tracks/_components/track-enrolled-section.tsx+++ b/apps/web/src/app/[locale]/tracks/_components/track-enrolled-section.tsx@@ -1,10 +1,10 @@-import { getServerAuthSession, type Session } from '@repo/auth/server';+import { auth, type Session } from '@repo/auth/server';import { prisma } from '@repo/db';import { EnrolledTrackSectionCarousel } from './track-enrolled-section-carousel';import { SkeletonTrack } from './SkeletonTrack';export async function EnrolledTrackSection() {- const session = await getServerAuthSession();+ const session = await auth();if (!session) {return null;diff --git a/apps/web/src/app/[locale]/tracks/_components/track-grid.tsx b/apps/web/src/app/[locale]/tracks/_components/track-grid.tsxindex 50375236..0d2fc666 100644--- a/apps/web/src/app/[locale]/tracks/_components/track-grid.tsx+++ b/apps/web/src/app/[locale]/tracks/_components/track-grid.tsx@@ -1,4 +1,4 @@-import { getServerAuthSession, type Session } from '@repo/auth/server';+import { auth, type Session } from '@repo/auth/server';import { prisma } from '@repo/db';import { withUnstableCache } from '~/utils/withUnstableCache';import { TrackCard } from './track-card';@@ -6,7 +6,7 @@ import { TrackCardSoon } from './track-card-soon';import { createTrackGridCacheKey } from './track.action';export async function TrackGrid() {- const session = await getServerAuthSession();+ const session = await auth();const tracks = await withUnstableCache({fn: getTracks,diff --git a/apps/web/src/app/[locale]/tracks/_components/track.action.ts b/apps/web/src/app/[locale]/tracks/_components/track.action.tsindex 69a8087d..d0cd980b 100644--- a/apps/web/src/app/[locale]/tracks/_components/track.action.ts+++ b/apps/web/src/app/[locale]/tracks/_components/track.action.ts@@ -1,6 +1,6 @@'use server';-import { getServerAuthSession, type Session } from '@repo/auth/server';+import { auth, type Session } from '@repo/auth/server';import { prisma } from '@repo/db';import { revalidateTag } from 'next/cache';import { cache } from 'react';@@ -13,7 +13,7 @@ export const createTrackGridCacheKey = (userId: string) => `user-${userId}-track* @param id The track id.*/export async function enrollUserInTrack(id: number, slug: string) {- const session = await getServerAuthSession();+ const session = await auth();if (!session) {throw new Error('User is not logged in');}@@ -41,7 +41,7 @@ export async function enrollUserInTrack(id: number, slug: string) {* @param id The track id.*/export async function unenrollUserFromTrack(id: number, slug: string) {- const session = await getServerAuthSession();+ const session = await auth();if (!session) {throw new Error('User is not logged in');}@@ -69,7 +69,7 @@ export async function unenrollUserFromTrack(id: number, slug: string) {* @param id The track id.*/export const getTrackDetails = cache(async (slug: string) => {- const session = await getServerAuthSession();+ const session = await auth();return prisma.track.findFirstOrThrow({where: {slug,diff --git a/apps/web/src/app/[locale]/wizard/_components/create.action.ts b/apps/web/src/app/[locale]/wizard/_components/create.action.tsindex d87df845..de46e13f 100644--- a/apps/web/src/app/[locale]/wizard/_components/create.action.ts+++ b/apps/web/src/app/[locale]/wizard/_components/create.action.ts@@ -1,11 +1,11 @@'use server';import { prisma } from '@repo/db';-import { getServerAuthSession } from '@repo/auth/server';+import { auth } from '@repo/auth/server';import { type CreateChallengeSchema } from '.';export async function uploadChallenge(data: CreateChallengeSchema, isUserACreator: boolean) {- const session = await getServerAuthSession();+ const session = await auth();if (!session) {throw new Error('Unauthorized');diff --git a/apps/web/src/app/[locale]/wizard/page.tsx b/apps/web/src/app/[locale]/wizard/page.tsxindex 6d9370f4..737fcf4e 100644--- a/apps/web/src/app/[locale]/wizard/page.tsx+++ b/apps/web/src/app/[locale]/wizard/page.tsx@@ -1,4 +1,4 @@-import { getServerAuthSession } from '@repo/auth/server';+import { auth } from '@repo/auth/server';import type { Metadata } from 'next';import { redirect } from 'next/navigation';import { buildMetaForDefault } from '~/app/metadata';@@ -13,7 +13,7 @@ export async function generateMetadata(): Promise<Metadata> {}export default async function Page() {- const session = await getServerAuthSession();+ const session = await auth();const isBeta = await isBetaUser(session);if (!isBeta) {diff --git a/apps/web/src/app/api/auth/[...nextauth]/route.ts b/apps/web/src/app/api/auth/[...nextauth]/route.tsindex 42e677ab..36cd532e 100644--- a/apps/web/src/app/api/auth/[...nextauth]/route.ts+++ b/apps/web/src/app/api/auth/[...nextauth]/route.ts@@ -1,6 +1 @@-import { authOptions } from '@repo/auth/server';-import NextAuth from '@repo/auth/next-auth';--const handler = NextAuth(authOptions);--export { handler as GET, handler as POST };+export { GET, POST } from '@repo/auth/server';diff --git a/apps/web/src/app/api/uploadthing/core.ts b/apps/web/src/app/api/uploadthing/core.tsindex e8532d52..ae59e9f9 100644--- a/apps/web/src/app/api/uploadthing/core.ts+++ b/apps/web/src/app/api/uploadthing/core.ts@@ -1,6 +1,6 @@import { createUploadthing, type FileRouter } from 'uploadthing/next';-import { getServerAuthSession, authOptions } from '@repo/auth/server';import { prisma } from '@repo/db';+import { auth } from '@repo/auth/server';const f = createUploadthing();@@ -32,7 +32,7 @@ export const ourFileRouter = {})// Set permissions and file types for this FileRoute.middleware(async () => {- const session = await getServerAuthSession();+ const session = await auth();// If you throw, the user will not be able to uploadif (!session?.user.id) throw new Error('Unauthorized');diff --git a/apps/web/src/components/Navigation/index.tsx b/apps/web/src/components/Navigation/index.tsxindex c70ef76e..8474baa1 100644--- a/apps/web/src/components/Navigation/index.tsx+++ b/apps/web/src/components/Navigation/index.tsx@@ -9,7 +9,7 @@ import { Play, Settings, Settings2, User } from '@repo/ui/icons';import Link from 'next/link';import { isAdminOrModerator } from '~/utils/auth-guards';import { getAllFlags } from '~/utils/feature-flags';-import { getServerAuthSession } from '@repo/auth/server';+import { auth } from '@repo/auth/server';import { ThemeButton } from './theme-button';import { NavLink } from './nav-link';import { NavWrapper } from './nav-wrapper';@@ -81,7 +81,7 @@ export async function Navigation() {}async function LoginButton() {- const session = await getServerAuthSession();+ const session = await auth();const isAdminOrMod = isAdminOrModerator(session);diff --git a/apps/web/src/components/ReportDialog/report-dialog.action.ts b/apps/web/src/components/ReportDialog/report-dialog.action.tsindex a8f3e10b..315638a1 100644--- a/apps/web/src/components/ReportDialog/report-dialog.action.ts+++ b/apps/web/src/components/ReportDialog/report-dialog.action.ts@@ -1,6 +1,6 @@'use server';-import { getServerAuthSession } from '@repo/auth/server';+import { auth } from '@repo/auth/server';import { prisma } from '@repo/db';import { type Prisma, type Report } from '@repo/db/types';@@ -70,7 +70,7 @@ export type SolutionReport = Omit<export async function addReport(report: ChallengeReport | CommentReport | SolutionReport | UserReport,) {- const reporter = await getServerAuthSession();+ const reporter = await auth();if (!reporter?.user.id) return 'not_logged_in';let filterData;diff --git a/apps/web/src/utils/server/get-similar-challenges.ts b/apps/web/src/utils/server/get-similar-challenges.tsindex f0e7ad5a..b49849b6 100644--- a/apps/web/src/utils/server/get-similar-challenges.ts+++ b/apps/web/src/utils/server/get-similar-challenges.ts@@ -1,5 +1,5 @@'use server';-import { getServerAuthSession } from '@repo/auth/server';+import { auth } from '@repo/auth/server';import { prisma } from '@repo/db';import type { Challenge } from '@repo/db/types';@@ -16,7 +16,7 @@ export async function getSimilarChallenges(maxChallenges = 2,): Promise<Challenge[]> {try {- const session = await getServerAuthSession();+ const session = await auth();const { difficulty } = await prisma.challenge.findFirstOrThrow({where: {id: challengeId,diff --git a/packages/auth/package.json b/packages/auth/package.jsonindex ab17c79a..1ac3ed5d 100644--- a/packages/auth/package.json+++ b/packages/auth/package.json@@ -30,7 +30,7 @@"dependencies": {"@next-auth/prisma-adapter": "^1.0.7","@repo/db": "workspace:*",- "next-auth": "^4.22.1"+ "next-auth": "5.0.0-beta.3"},"devDependencies": {"@repo/lint": "workspace:*",diff --git a/packages/auth/src/next-auth.ts b/packages/auth/src/next-auth.tsindex 8aad39fb..38599e08 100644--- a/packages/auth/src/next-auth.ts+++ b/packages/auth/src/next-auth.ts@@ -1,3 +1,3 @@-import NextAuth from 'next-auth/next';+import NextAuth from 'next-auth';export default NextAuth;diff --git a/packages/auth/src/server.ts b/packages/auth/src/server.tsindex 0d9aa27b..1d85214c 100644--- a/packages/auth/src/server.ts+++ b/packages/auth/src/server.ts@@ -1,8 +1,9 @@import { PrismaAdapter } from '@next-auth/prisma-adapter';import type { Role, RoleTypes } from '@repo/db/types';-import { getServerSession, type DefaultSession, type NextAuthOptions } from 'next-auth';+import { type DefaultSession } from 'next-auth';import GitHubProvider from 'next-auth/providers/github';import { prisma } from '@repo/db';+import NextAuth from './next-auth';export type { Session, DefaultSession as DefaultAuthSession } from 'next-auth';@@ -38,7 +39,10 @@ const useSecureCookies = process.env.VERCEL_ENV === 'production';const cookiePrefix = useSecureCookies ? '__Secure-' : '';const cookieDomain = useSecureCookies ? 'typehero.dev' : undefined;-export const authOptions: NextAuthOptions = {+export const {+ handlers: { GET, POST },+ auth,+} = NextAuth({pages: {signIn: '/login',},@@ -56,18 +60,13 @@ export const authOptions: NextAuthOptions = {},callbacks: {session: async ({ session, user }) => {- // 1. Statelet userRoles: RoleTypes[] = [];-- // 2. If user already has roles, reduce them to a RoleTypes array.if (user.roles) {userRoles = user.roles.reduce((acc: RoleTypes[], role) => {acc.push(role.role);return acc;}, []);}-- // 3. If the current user doesn't have a USER role. Assign one.if (!userRoles.includes('USER')) {const updatedUser = await prisma.user.update({where: {@@ -89,13 +88,11 @@ export const authOptions: NextAuthOptions = {roles: true,},});-userRoles = updatedUser.roles.reduce((acc: RoleTypes[], role) => {acc.push(role.role);return acc;}, []);}-return {...session,user: {@@ -114,13 +111,4 @@ export const authOptions: NextAuthOptions = {clientSecret: process.env.GITHUB_SECRET!,}),],-};--/**- * Wrapper for `getServerSession` so that you don't need to import the `authOptions` in every file.- *- * @see https://next-auth.js.org/configuration/nextjs- */-export const getServerAuthSession = () => {- return getServerSession(authOptions);-};+});diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 9e992111..1a108648 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -456,13 +456,13 @@ importers:dependencies:'@next-auth/prisma-adapter':specifier: ^1.0.7- version: 1.0.7(@prisma/[email protected])([email protected])+ version: 1.0.7(@prisma/[email protected])([email protected])'@repo/db':specifier: workspace:*version: link:../dbnext-auth:- specifier: ^4.22.1- version: 4.22.1(patch_hash=mr6pbhgbmy4dt4xo4hxm5k4ym4)([email protected])([email protected])([email protected])+ specifier: 5.0.0-beta.3+ version: 5.0.0-beta.3([email protected])([email protected])devDependencies:'@repo/lint':specifier: workspace:*@@ -730,7 +730,7 @@ importers:dependencies:'@next/eslint-plugin-next':specifier: canary- version: 14.0.2-canary.21+ version: 14.0.3-canary.4'@repo/tsconfig':specifier: workspace:*version: link:../config-typescript@@ -742,7 +742,7 @@ importers:version: 5.62.0([email protected])([email protected])'@vercel/style-guide':specifier: ^4.0.2eslint:specifier: ^8.45.0version: 8.45.0@@ -818,6 +818,22 @@ packages:'@jridgewell/trace-mapping': 0.3.18dev: false+ /@auth/[email protected]:+ resolution: {integrity: sha512-/hVzGuFw7nAZimliD8kpuKnNjvkRu+jpaVhYB/FaIXLNJFNwhbO2MgXBnr5tvLIHgRJnR5C9UN5RNpQXiFHuSA==}+ peerDependencies:+ nodemailer: ^6.8.0+ peerDependenciesMeta:+ nodemailer:+ optional: true+ dependencies:+ '@panva/hkdf': 1.1.1+ cookie: 0.5.0+ jose: 4.14.4+ oauth4webapi: 2.3.0+ preact: 10.11.3+ preact-render-to-string: 5.2.3([email protected])+ dev: false+/@babel/[email protected]:resolution: {integrity: sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==}engines: {node: '>=6.9.0'}@@ -2298,14 +2314,14 @@ packages:dev: falsepatched: trueresolution: {integrity: sha512-Cdko4KfcmKjsyHFrWwZ//lfLUbcLqlyFqjd/nYE2m3aZ7tjMNUjpks47iw7NTCnXf+5UWz5Ypyt1dSs1EP5QJw==}peerDependencies:'@prisma/client': '>=2.26.0 || >=3'next-auth: ^4dependencies:'@prisma/client': 5.0.0([email protected])- next-auth: 4.22.1(patch_hash=mr6pbhgbmy4dt4xo4hxm5k4ym4)([email protected])([email protected])([email protected])+ next-auth: 5.0.0-beta.3([email protected])([email protected])dev: false/@next/[email protected]:@@ -2317,10 +2333,6 @@ packages:- utf-8-validatedev: false- /@next/[email protected]:- resolution: {integrity: sha512-LGegJkMvRNw90WWphGJ3RMHMVplYcOfRWf2Be3td3sUa+1AaxmsYyANsA+znrGCBjXJNi4XAQlSoEfUxs/4kIQ==}- dev: false-/@next/[email protected]:resolution: {integrity: sha512-Ms8ZswqY65/YfcjrlcIwMPD7Rg/dVjdLapMcSHG26W6O67EJDF435ShW4H4LXi1xKO1oRc97tLXUpx8jpLe86A==}dev: false@@ -2331,21 +2343,12 @@ packages:glob: 7.1.7dev: true- /@next/[email protected]:- resolution: {integrity: sha512-ztXdwdEdW7mLU7QCiU4huIMQNQfnKw0vuGLDjSJXetiPdp+SdfViHH5RuTB+/CUvAbNUonqeuV0gP1BPRf6JLg==}+ /@next/[email protected]:+ resolution: {integrity: sha512-N2BBtLnP6n2IiynOIJikkLiAQnnZ7s3sl75cV7TRx9KxuvtJ8KYTqGHoMfisqKb/Ji3Ey4TTCH+65fbRqaZL9w==}dependencies:glob: 7.1.7dev: false- /@next/[email protected]:- resolution: {integrity: sha512-Df8SHuXgF1p+aonBMcDPEsaahNo2TCwuie7VXED4FVyECvdXfRT9unapm54NssV9tF3OQFKBFOdlje4T43VO0w==}- engines: {node: '>= 10'}- cpu: [arm64]- os: [darwin]- requiresBuild: true- dev: false- optional: true-/@next/[email protected]:resolution: {integrity: sha512-JyxnGCS4qT67hdOKQ0CkgFTp+PXub5W1wsGvIq98TNbF3YEIN7iDekYhYsZzc8Ov0pWEsghQt+tANdidITCLaw==}engines: {node: '>= 10'}@@ -2355,15 +2358,6 @@ packages:dev: falseoptional: true- /@next/[email protected]:- resolution: {integrity: sha512-siPuUwO45PnNRMeZnSa8n/Lye5ZX93IJom9wQRB5DEOdFrw0JjOMu1GINB8jAEdwa7Vdyn1oJ2xGNaQpdQQ9Pw==}- engines: {node: '>= 10'}- cpu: [x64]- os: [darwin]- requiresBuild: true- dev: false- optional: true-/@next/[email protected]:resolution: {integrity: sha512-625Z7bb5AyIzswF9hvfZWa+HTwFZw+Jn3lOBNZB87lUS0iuCYDHqk3ujuHCkiyPtSC0xFBtYDLcrZ11mF/ap3w==}engines: {node: '>= 10'}@@ -2373,15 +2367,6 @@ packages:dev: falseoptional: true- /@next/[email protected]:- resolution: {integrity: sha512-l/k/fvRP/zmB2jkFMfefmFkyZbDkYW0mRM/LB+tH5u9pB98WsHXC0WvDHlGCYp3CH/jlkJPL7gN8nkTQVrQ/2w==}- engines: {node: '>= 10'}- cpu: [arm64]- os: [linux]- requiresBuild: true- dev: false- optional: true-/@next/[email protected]:resolution: {integrity: sha512-iVpn3KG3DprFXzVHM09kvb//4CNNXBQ9NB/pTm8LO+vnnnaObnzFdS5KM+w1okwa32xH0g8EvZIhoB3fI3mS1g==}engines: {node: '>= 10'}@@ -2391,15 +2376,6 @@ packages:dev: falseoptional: true- /@next/[email protected]:- resolution: {integrity: sha512-YYGb7SlLkI+XqfQa8VPErljb7k9nUnhhRrVaOdfJNCaQnHBcvbT7cx/UjDQLdleJcfyg1Hkn5YSSIeVfjgmkTg==}- engines: {node: '>= 10'}- cpu: [arm64]- os: [linux]- requiresBuild: true- dev: false- optional: true-/@next/[email protected]:resolution: {integrity: sha512-mVsGyMxTLWZXyD5sen6kGOTYVOO67lZjLApIj/JsTEEohDDt1im2nkspzfV5MvhfS7diDw6Rp/xvAQaWZTv1Ww==}engines: {node: '>= 10'}@@ -2409,15 +2385,6 @@ packages:dev: falseoptional: true- /@next/[email protected]:- resolution: {integrity: sha512-uE61vyUSClnCH18YHjA8tE1prr/PBFlBFhxBZis4XBRJoR+txAky5d7gGNUIbQ8sZZ7LVkSVgm/5Fc7mwXmRAg==}- engines: {node: '>= 10'}- cpu: [x64]- os: [linux]- requiresBuild: true- dev: false- optional: true-/@next/[email protected]:resolution: {integrity: sha512-wMqf90uDWN001NqCM/auRl3+qVVeKfjJdT9XW+RMIOf+rhUzadmYJu++tp2y+hUbb6GTRhT+VjQzcgg/QTD9NQ==}engines: {node: '>= 10'}@@ -2427,15 +2394,6 @@ packages:dev: falseoptional: true- /@next/[email protected]:- resolution: {integrity: sha512-qVEKFYML/GvJSy9CfYqAdUexA6M5AklYcQCW+8JECmkQHGoPxCf04iMh7CPR7wkHyWWK+XLt4Ja7hhsPJtSnhg==}- engines: {node: '>= 10'}- cpu: [x64]- os: [linux]- requiresBuild: true- dev: false- optional: true-/@next/[email protected]:resolution: {integrity: sha512-ol1X1e24w4j4QwdeNjfX0f+Nza25n+ymY0T2frTyalVczUmzkVD7QGgPTZMHfR1aLrO69hBs0G3QBYaj22J5GQ==}engines: {node: '>= 10'}@@ -2445,15 +2403,6 @@ packages:dev: falseoptional: true- /@next/[email protected]:- resolution: {integrity: sha512-mDSQfqxAlfpeZOLPxLymZkX0hYF3juN57W6vFHTvwKlnHfmh12Pt7hPIRLYIShk8uYRsKPtMTth/EzpwRI+u8w==}- engines: {node: '>= 10'}- cpu: [arm64]- os: [win32]- requiresBuild: true- dev: false- optional: true-/@next/[email protected]:resolution: {integrity: sha512-WEmTEeWs6yRUEnUlahTgvZteh5RJc4sEjCQIodJlZZ5/VJwVP8p2L7l6VhzQhT4h7KvLx/Ed4UViBdne6zpIsw==}engines: {node: '>= 10'}@@ -2463,15 +2412,6 @@ packages:dev: falseoptional: true- /@next/[email protected]:- resolution: {integrity: sha512-aoqAT2XIekIWoriwzOmGFAvTtVY5O7JjV21giozBTP5c6uZhpvTWRbmHXbmsjZqY4HnEZQRXWkSAppsIBweKqw==}- engines: {node: '>= 10'}- cpu: [ia32]- os: [win32]- requiresBuild: true- dev: false- optional: true-/@next/[email protected]:resolution: {integrity: sha512-oFpHphN4ygAgZUKjzga7SoH2VGbEJXZa/KL8bHCAwCjDWle6R1SpiGOdUdA8EJ9YsG1TYWpzY6FTbUA+iAJeww==}engines: {node: '>= 10'}@@ -2481,15 +2421,6 @@ packages:dev: falseoptional: true- /@next/[email protected]:- resolution: {integrity: sha512-cyRvlAxwlddlqeB9xtPSfNSCRy8BOa4wtMo0IuI9P7Y0XT2qpDrpFKRyZ7kUngZis59mPVla5k8X1oOJ8RxDYg==}- engines: {node: '>= 10'}- cpu: [x64]- os: [win32]- requiresBuild: true- dev: false- optional: true-/@next/[email protected]:resolution: {integrity: sha512-FFp3nOJ/5qSpeWT0BZQ+YE1pSMk4IMpkME/1DwKBwhg4mJLB9L+6EXuJi4JEwaJdl5iN+UUlmUD3IsR1kx5fAg==}engines: {node: '>= 10'}@@ -5136,7 +5067,7 @@ packages:yoga-wasm-web: 0.3.0dev: false- /@vercel/[email protected](@next/[email protected])([email protected])([email protected])([email protected]):+ /@vercel/[email protected](@next/[email protected])([email protected])([email protected])([email protected]):resolution: {integrity: sha512-FroL+oOePzhw7n/I+f7zr4WNroGHT/+2TlW6WH9+CVSjMNsEyu7Qstj2mI5gWIBjT1Y2ZImKPppCzI2cIYmNZw==}engines: {node: '>=16'}peerDependencies:@@ -5156,7 +5087,7 @@ packages:dependencies:'@babel/core': 7.22.10'@babel/eslint-parser': 7.22.10(@babel/[email protected])([email protected])- '@next/eslint-plugin-next': 14.0.2-canary.21+ '@next/eslint-plugin-next': 14.0.3-canary.4'@rushstack/eslint-patch': 1.3.2'@typescript-eslint/eslint-plugin': 5.59.1(@typescript-eslint/[email protected])([email protected])([email protected])'@typescript-eslint/parser': 5.62.0([email protected])([email protected])@@ -9672,7 +9603,7 @@ packages:resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==}- /[email protected](patch_hash=mr6pbhgbmy4dt4xo4hxm5k4ym4)([email protected])([email protected])([email protected]):+ /[email protected](patch_hash=mr6pbhgbmy4dt4xo4hxm5k4ym4)([email protected])([email protected])([email protected]):resolution: {integrity: sha512-NTR3f6W7/AWXKw8GSsgSyQcDW6jkslZLH8AiZa5PQ09w1kR8uHtR9rez/E9gAq/o17+p0JYHE8QjF3RoniiObA==}peerDependencies:next: ^12.2.5 || ^13@@ -9687,7 +9618,7 @@ packages:'@panva/hkdf': 1.1.1cookie: 0.5.0jose: 4.14.4- next: 13.5.4([email protected])([email protected])oauth: 0.9.15openid-client: 5.4.3preact: 10.16.0@@ -9698,31 +9629,20 @@ packages:dev: falsepatched: true- /[email protected](patch_hash=mr6pbhgbmy4dt4xo4hxm5k4ym4)([email protected])([email protected])([email protected]):- resolution: {integrity: sha512-NTR3f6W7/AWXKw8GSsgSyQcDW6jkslZLH8AiZa5PQ09w1kR8uHtR9rez/E9gAq/o17+p0JYHE8QjF3RoniiObA==}+ resolution: {integrity: sha512-WOKhATBFGeONV+29HzFmspNmL7NXxrsCWLfaDKmAd/4DD1nqXE0BzNFH8t3SJBx7PUDMnB6F7xB76LM/AaV1MQ==}peerDependencies:- next: ^12.2.5 || ^13+ next: ^14nodemailer: ^6.6.5- react: ^17.0.2 || ^18- react-dom: ^17.0.2 || ^18+ react: ^18.2.0peerDependenciesMeta:nodemailer:optional: truedependencies:- '@babel/runtime': 7.22.6- '@panva/hkdf': 1.1.1- cookie: 0.5.0- jose: 4.14.4+ '@auth/core': 0.0.0-manual.e9863699- oauth: 0.9.15- openid-client: 5.4.3- preact: 10.16.0- preact-render-to-string: 5.2.6([email protected])react: 18.2.0- react-dom: 18.2.0([email protected])- uuid: 8.3.2dev: false- patched: trueresolution: {integrity: sha512-peIJXXEC5lM7zZONCgN1uUxCkIHpSW1pZuHoRTp9ND14K7CDdHajDMz9RTxVCmQUGWXSaqruM6XVAuq4d+Gpxg==}@@ -9744,45 +9664,6 @@ packages:react-dom: 18.2.0([email protected])dev: false- resolution: {integrity: sha512-+93un5S779gho8y9ASQhb/bTkQF17FNQOtXLKAj3lsNgltEcF0C5PMLLncDmH+8X1EnJH1kbqAERa29nRXqhjA==}- engines: {node: '>=16.14.0'}- hasBin: true- peerDependencies:- '@opentelemetry/api': ^1.1.0- react: ^18.2.0- react-dom: ^18.2.0- sass: ^1.3.0- peerDependenciesMeta:- '@opentelemetry/api':- optional: true- sass:- optional: true- dependencies:- '@next/env': 13.5.4- '@swc/helpers': 0.5.2- busboy: 1.6.0- caniuse-lite: 1.0.30001522- postcss: 8.4.31- react: 18.2.0- react-dom: 18.2.0([email protected])- styled-jsx: 5.1.1(@babel/[email protected])([email protected])- watchpack: 2.4.0- optionalDependencies:- '@next/swc-darwin-arm64': 13.5.4- '@next/swc-darwin-x64': 13.5.4- '@next/swc-linux-arm64-gnu': 13.5.4- '@next/swc-linux-arm64-musl': 13.5.4- '@next/swc-linux-x64-gnu': 13.5.4- '@next/swc-linux-x64-musl': 13.5.4- '@next/swc-win32-arm64-msvc': 13.5.4- '@next/swc-win32-ia32-msvc': 13.5.4- '@next/swc-win32-x64-msvc': 13.5.4- transitivePeerDependencies:- - '@babel/core'- - babel-plugin-macros- dev: false-resolution: {integrity: sha512-s4YaLpE4b0gmb3ggtmpmV+wt+lPRuGtANzojMQ2+gmBpgX9w5fTbjsy6dXByBuENsdCX5pukZH/GxdFgO62+pA==}engines: {node: '>=18.17.0'}@@ -9911,6 +9792,10 @@ packages:boolbase: 1.0.0dev: false+ resolution: {integrity: sha512-JGkb5doGrwzVDuHwgrR4nHJayzN4h59VCed6EW8Tql6iHDfZIabCJvg6wtbn5q6pyB2hZruI3b77Nudvq7NmvA==}+ dev: false+resolution: {integrity: sha512-a5ERWK1kh38ExDEfoO6qUHJb32rd7aYmPHuyCu3Fta/cnICvYmgd2uhuKXvPD+PXB+gCEYYEaQdIRAjCOwAKNA==}dev: false@@ -10416,6 +10301,15 @@ packages:picocolors: 1.0.0source-map-js: 1.0.2+ resolution: {integrity: sha512-aPDxUn5o3GhWdtJtW0svRC2SS/l8D9MAgo2+AWml+BhDImb27ALf04Q2d+AHqUUOc6RdSXFIBVa2gxzgMKgtZA==}+ peerDependencies:+ preact: '>=10'+ dependencies:+ preact: 10.11.3+ pretty-format: 3.8.0+ dev: false+resolution: {integrity: sha512-JyhErpYOvBV1hEPwIxc/fHWXPfnEGdRKxc8gFdAZ7XV4tlzyzG847XAyEZqoDnynP88akM4eaHcSOzNcLWFguw==}peerDependencies:@@ -10425,6 +10319,10 @@ packages:pretty-format: 3.8.0dev: false+ resolution: {integrity: sha512-eY93IVpod/zG3uMF22Unl8h9KkrcKIRs2EGar8hwLZZDU1lkjph303V9HZBwufh2s736U6VXuhD109LYqPoffg==}+ dev: false+resolution: {integrity: sha512-XTSj3dJ4roKIC93pald6rWuB2qQJO9gO2iLLyTe87MrjQN+HklueLsmskbywEWqCHlclgz3/M4YLL2iBr9UmMA==}dev: false