Next.js Discord

Discord Forum

Setting a user cookie in server actions without resorting to the RESTful api or logic dupe

Unanswered
Flammulated Owl posted this in #help-forum
Open in Discord
Flammulated OwlOP
  const result = await payload.login({
    collection: 'users',
    data: {
      email,
      password,
    },
  })

This is not setting the user cookie. I'd like to stay in the NextJS way of doing things with the server action. I'd prefer not to duplicate PayloadCMS library cookie setting logic.

0 Replies