How to get authenticated while testing #12130
Unanswered
bhubavenski
asked this question in
Help
Replies: 2 comments
-
Testing locally or for your unit/e2e test? You can use the |
Beta Was this translation helpful? Give feedback.
0 replies
-
Ok, but, what params to set in “encode” function
…On Mon, 4 Nov 2024 at 3:28, khuezy ***@***.***> wrote:
Testing locally or for your unit/e2e test? You can use the encode method
from next-auth/jwt then manually add that token to your browser cookie: next-auth.session-token:
<encoded jwt>. Or just setup a test oauth provider, eg google and sign in.
—
Reply to this email directly, view it on GitHub
<#12130 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A52KMAVXW56WOCT7WAK2JQ3Z625UNAVCNFSM6AAAAABQVWROKOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCMJTG43DEOI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to test my app, while I am authenticated. For authentication I am using next-auth V4. What many people are doing is to manually attach specific cookies and etc. so they can get authenticated. I don't know what I have to do. I am using next auth and I don't know what it is looking for so I can provide it. So, how I can test my app, as authenticated person, without going to /login page every time before start testing the real thing
Beta Was this translation helpful? Give feedback.
All reactions