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
Ping
Ping2mo ago
Have you added your domain/vercel domain to the trustedOrigin list in your Better Auth config?
Mydsi
MydsiOP2mo ago
Is that the auth.ts file?
Ping
Ping2mo ago
Yeah.
Mydsi
MydsiOP2mo ago
Aaa forgot that was a option, one moment and i will try.
Mydsi
MydsiOP2mo ago
That didn't fix it
No description
Mydsi
MydsiOP2mo ago
What can be the reason? Does better auth support wildcard?
Mydsi
MydsiOP2mo ago
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
No description
Mydsi
MydsiOP2mo ago
This is the api endpoint
No description

Did you find this page helpful?