How to make auth work on developer domains?

I'm using as service that creates lots staging domains. For example:
2199df03.jam-523.pages.dev cd749df2.jam-523.pages.dev qa789d3e.jam-523.pages.dev
I'm trying to figure out how to setup my environment variables so any web-page on a subdomain of jam-523.pages.dev can authenticate with my better-auth instance. Or maybe, even if OAuth login-in doesn't work, I'd like to be able to paste in a cookie from my prod domain, and have it work with the staging domains.

How can I make this happen?
Was this page helpful?