Hey folks. Just wondering the best way to tackle testing with super tokens. In my fastify tests I actually generate a JWT and send the request in my test. Will post a screenshot. Ideas how to do a similar thing with supertokens?
r
rp_st
05/19/2022, 1:20 PM
Well.. with supertokens it's a little more complex.
You need to call the login API which will generate cookies and send it in the response as cookies.
You can then extract those cookies and add it to your request
j
Jake
05/19/2022, 1:20 PM
Is there any way to 'mock' core?
r
rp_st
05/19/2022, 1:21 PM
not yet easily unfortunatrly. So you will have to run the core as well - you can do so via its in memory db
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).