Newbie issue
Hello!
I get this reponse when i deployed it to vercel and trying to login
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:3000/api/auth/sign-in/email?currentURL=https%3A%2F%2Fdemos-kj88v2vt1-madszbcs-projects.vercel.app%2Fauth%3Fredirect%3D%252F. (Reason: CORS request did not succeed). Status code: (null).
How can i fix that or atleast begin to fix it?
9 Replies
Have you added your domain/vercel domain to the
trustedOrigin
list in your Better Auth config?Is that the auth.ts file?
Yeah.
Aaa forgot that was a option, one moment and i will try.
That didn't fix it

http://localhost:3000/api/auth/sign-in/email?currentURL=https%3A%2F%2Fdemos-kj88v2vt1-madszbcs-projects.vercel.app%2Fauth%3Fredirect%3D%252F
This is the post request url if it helps anything

What can be the reason?
Does better auth support wildcard?
Now i got a different issue.
I just added a bunch of ips and links to the trusted origin list.
But now i get this when loggin in

This is the api endpoint
