How to manually add session cookie with NextAuth.js
Unanswered
Maltese posted this in #help-forum
MalteseOP
I am testing my application with playwright and I want to test it in authenticated state. That mean the user (bot) should be signed in, but I don't want to go every time trough the signing in flow ( sign in button -> fill form -> press enter -> done ) that is a lot of work, given I can just add cookie for authenticated state. How I can do that, what fields should that cookie have? How to encode properly the new token?
1 Reply
MalteseOP
I am searching for how to create a token with NextAuth and how to attach it to cookie and what cookie