Different frontend and backend URL with social logins

Hi, my backend is hosted on api.mydomain.com while my frontend is hosted on mydomain.com. Everytime I try to login through google social sign-in I get redirected to api.mydomain.com instead.
How can I make better-auth work in this scenario?
Solution
I just had to provide a callbackURL during signIn.social
Was this page helpful?