Cypress E2E Social Sign-In Session

Seeking some help mocking a session within Cypress E2E Next.js project:

Using Google sign-in:
I started off trying to mock the /callback endpoint providing the
code
from Google OAuth Playground based on this Cypress guide, but got stuck with mocking state because i'm not sure where or how in the source code its being set.

Now i'm thinking the better approach is to seed the session and/or verification table with a mockedSession and then mocking the cookie. I need some help here, im not sure exactly what im doing.

I know the name of the cookie is better-auth.session_token and the value format issessionToken.BETTER_AUTH_SECRET and then i believe it also needs to be serialized or something. Not sure exactly how to achieve these steps.

Please advise, much appreciated
Solution
I found the way, basically dont e2e oauth. I use email+password for dev only to gain session
Was this page helpful?