Use setSessionCookie outside plugins

Hello, I have an endpoint in nuxt, I sould use setSessionCookie, but I'm not unable to recreate the context
const auth = await serverAuth()
const ctx = await auth.$context
await setSessionCookie(
ctx,
{ session, user },
rememberMe,
)
const auth = await serverAuth()
const ctx = await auth.$context
await setSessionCookie(
ctx,
{ session, user },
rememberMe,
)
how to use setSessionCookie outside the plugin?
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?