Return POST /api/auth/sign-in/social 404 when I click the Google SignIn button
I follow all the guides on offical pages,YouTube videos,research all the github repos,just still cannot login with Google Oauth,this works well when I am using auth.js,but as I tried to use better-auth,it cannot work and return 404.Could you help me to solve it?Thx a lot!





5 Replies
Return 404 like this.

Thanks!I figure it out!
Solution
Just make sure the file structure is right!
can you clarify which structure was wrong? having a similar problem with the stripe-plugin in nextjs, but cannot figure out, why my subscription endpoints throw 404
If you use src folder and app route,just place route.ts into src/app/api/auth/[...all],
Not src/api/auth/[...all]!