GET /api/auth/get-session

when i wanted to open my dashboard i see a lot of calling the session (it not in a loop) iam using nextjs and server acttion this is how i get the session :get session in use client: import { useSession } from "@/auth-client" const session = useSession() const userId = session.data?.user.image get session in use server: import { headers } from "next/headers" import { auth } from "@/auth" const session = await auth.api.getSession({ headers: await headers(), }) when i wanted to acces dashboard :/agency/dashboard GET /api/auth/get-session 200 in 5125ms GET /api/auth/get-session 200 in 2391ms GET /api/auth/get-session 200 in 3795ms GET /api/auth/get-session 200 in 75ms GET /api/auth/get-session 200 in 69ms GET /api/auth/get-session 200 in 63ms GET /api/auth/get-session 200 in 55ms GET /api/auth/get-session 200 in 58ms GET /api/auth/get-session 200 in 54ms GET /api/auth/get-session 200 in 59ms GET /api/auth/get-session 200 in 59ms GET /api/auth/get-session 200 in 63ms GET /api/auth/get-session 200 in 78ms GET /fr/agency/dashboard 200 in 59183ms GET /api/auth/get-session 200 in 222ms POST /fr/agency/dashboard 200 in 1731ms
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?