"use strict";(()=>{var e={};e.id=912,e.ids=[912],e.modules={53524:e=>{e.exports=require("@prisma/client")},72934:e=>{e.exports=require("next/dist/client/components/action-async-storage.external.js")},54580:e=>{e.exports=require("next/dist/client/components/request-async-storage.external.js")},45869:e=>{e.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},20399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},27790:e=>{e.exports=require("assert")},78893:e=>{e.exports=require("buffer")},84770:e=>{e.exports=require("crypto")},17702:e=>{e.exports=require("events")},32615:e=>{e.exports=require("http")},35240:e=>{e.exports=require("https")},86624:e=>{e.exports=require("querystring")},17360:e=>{e.exports=require("url")},21764:e=>{e.exports=require("util")},71568:e=>{e.exports=require("zlib")},56883:(e,r,t)=>{t.r(r),t.d(r,{originalPathname:()=>h,patchFetch:()=>q,requestAsyncStorage:()=>c,routeModule:()=>d,serverHooks:()=>m,staticGenerationAsyncStorage:()=>x});var s={};t.r(s),t.d(s,{GET:()=>l,POST:()=>l});var a=t(49303),i=t(88716),n=t(60670),o=t(75571),u=t.n(o),p=t(90455);let l=u()(p.L),d=new a.AppRouteRouteModule({definition:{kind:i.x.APP_ROUTE,page:"/api/auth/[...nextauth]/route",pathname:"/api/auth/[...nextauth]",filename:"route",bundlePath:"app/api/auth/[...nextauth]/route"},resolvedPagePath:"/Users/jarolsanchez/Desktop/evotrucks/nextjs_space/app/api/auth/[...nextauth]/route.ts",nextConfigOutput:"",userland:s}),{requestAsyncStorage:c,staticGenerationAsyncStorage:x,serverHooks:m}=d,h="/api/auth/[...nextauth]/route";function q(){return(0,n.patchFetch)({serverHooks:m,staticGenerationAsyncStorage:x})}},90455:(e,r,t)=>{t.d(r,{L:()=>o});var s=t(53797),a=t(42023),i=t.n(a),n=t(72331);let o={providers:[(0,s.Z)({name:"credentials",credentials:{email:{label:"Email",type:"email"},password:{label:"Password",type:"password"}},async authorize(e){if(!e?.email||!e?.password)return null;try{let r=await n._.user.findUnique({where:{email:e.email}});if(!r||!await i().compare(e.password,r.password))return null;return{id:r.id,email:r.email,name:r.name,role:r.role}}catch{return null}}})],session:{strategy:"jwt"},callbacks:{jwt:async({token:e,user:r})=>(r&&(e.role=r?.role,e.id=r?.id),e),session:async({session:e,token:r})=>(e?.user&&(e.user.role=r?.role,e.user.id=r?.id),e)},pages:{signIn:"/admin/login"},secret:process.env.NEXTAUTH_SECRET}},72331:(e,r,t)=>{t.d(r,{_:()=>a});var s=t(53524);let a=globalThis.prisma||new s.PrismaClient}};var r=require("../../../../webpack-runtime.js");r.C(e);var t=e=>r(r.s=e),s=r.X(0,[948,598,790],()=>t(56883));module.exports=s})();