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!
No description
No description
No description
No description
No description
Solution:
Just make sure the file structure is right!
Jump to solution
5 Replies
Rangen
RangenOP2mo ago
Return 404 like this.
No description
Rangen
RangenOP2mo ago
Thanks!I figure it out!
Solution
Rangen
Rangen2mo ago
Just make sure the file structure is right!
ekpah
ekpah2mo ago
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
Rangen
RangenOP2mo ago
If you use src folder and app route,just place route.ts into src/app/api/auth/[...all], Not src/api/auth/[...all]!

Did you find this page helpful?