chore(debug): auth
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import { auth, signIn } from "@/auth"
|
||||
import { redirect } from "next/navigation"
|
||||
|
||||
import { auth } from "@/auth"
|
||||
|
||||
import type { LangParams, LayoutArgs } from "@/types/params"
|
||||
|
||||
@@ -12,10 +14,7 @@ export default async function ProtectedLayout({
|
||||
* protected route group is actually protected.
|
||||
*/
|
||||
if (!session) {
|
||||
await signIn("curity", undefined, {
|
||||
ui_locales: params.lang,
|
||||
})
|
||||
return null
|
||||
redirect(`/${params.lang}/login`)
|
||||
}
|
||||
|
||||
return <>{children}</>
|
||||
|
||||
Reference in New Issue
Block a user