Highlighted
BABetter Auth
•Created by Highlighted on 2/23/2025 in #help
Better-auth and e2e tests
Hello,
So I've encountered a difficulty creating fake users for e2e testing in playwright. I dont know how to generate fake token to add to the cookies. I've inspected the valid cookie with an account logged in normally and it seems like its just a
session token + "." + some string in the end
, ex: 123abc.123abc
, but I have no idea how to generate that string. I would guess that its based on the secret. Thats what I've tried:
I've also searched the docs for some examples or maybe methods to generate it, but no luck. Anyone knows what to do?7 replies