debug: add logging
This commit is contained in:
@@ -13,6 +13,7 @@ export async function GET(
|
|||||||
request: NextRequest,
|
request: NextRequest,
|
||||||
context: { params: { lang: Lang } }
|
context: { params: { lang: Lang } }
|
||||||
) {
|
) {
|
||||||
|
console.log("LOGOUT ROUTE DEBUG")
|
||||||
let redirectHeaders: Headers | undefined = undefined
|
let redirectHeaders: Headers | undefined = undefined
|
||||||
let redirectTo: string
|
let redirectTo: string
|
||||||
|
|
||||||
|
|||||||
34
auth.ts
34
auth.ts
@@ -146,23 +146,23 @@ export const config = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// events: {
|
events: {
|
||||||
// async signIn() {
|
async signIn() {
|
||||||
// console.log("#### SIGNIN EVENT ARGS ######")
|
console.log("#### SIGNIN EVENT ARGS ######")
|
||||||
// console.log(arguments)
|
console.log(arguments)
|
||||||
// console.log("#### END - SIGNIN EVENT ARGS ######")
|
console.log("#### END - SIGNIN EVENT ARGS ######")
|
||||||
// },
|
},
|
||||||
// async signOut() {
|
async signOut() {
|
||||||
// console.log("#### SIGNOUT EVENT ARGS ######")
|
console.log("#### SIGNOUT EVENT ARGS ######")
|
||||||
// console.log(arguments)
|
console.log(arguments)
|
||||||
// console.log("#### END - SIGNOUT EVENT ARGS ######")
|
console.log("#### END - SIGNOUT EVENT ARGS ######")
|
||||||
// },
|
},
|
||||||
// async session() {
|
async session() {
|
||||||
// console.log("#### SESSION EVENT ARGS ######")
|
console.log("#### SESSION EVENT ARGS ######")
|
||||||
// console.log(arguments)
|
console.log(arguments)
|
||||||
// console.log("#### END - SESSION EVENT ARGS ######")
|
console.log("#### END - SESSION EVENT ARGS ######")
|
||||||
// },
|
},
|
||||||
// },
|
},
|
||||||
// logger: {
|
// logger: {
|
||||||
// error(code, ...message) {
|
// error(code, ...message) {
|
||||||
// console.info("ERROR LOGGER")
|
// console.info("ERROR LOGGER")
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import type { NextMiddleware } from "next/server"
|
|||||||
import type { MiddlewareMatcher } from "@/types/middleware"
|
import type { MiddlewareMatcher } from "@/types/middleware"
|
||||||
|
|
||||||
export const middleware: NextMiddleware = (request) => {
|
export const middleware: NextMiddleware = (request) => {
|
||||||
|
console.log("CURRENT WEB LOGOUT MIDDLEWARE")
|
||||||
|
console.log(request)
|
||||||
const currentwebUrl = request.nextUrl.searchParams.get("currentweb")
|
const currentwebUrl = request.nextUrl.searchParams.get("currentweb")
|
||||||
if (currentwebUrl == null || undefined) {
|
if (currentwebUrl == null || undefined) {
|
||||||
return badRequest()
|
return badRequest()
|
||||||
|
|||||||
Reference in New Issue
Block a user