79217217

Date: 2024-11-23 05:38:01
Score: 1
Natty:
Report link

you can import cookie like this

import { cookies } from "next/headers";

and after that you should use set method from cookie which you have imported from next/headers like this :

cookies().set('name of token', yourtoken ,  { httpOnly: true })

and then return your token

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Herus