Magic Link Tutorial missing something??

I believe I've followed all the steps of all the tutorials for getting Magic Links working with svelte kit. When I submit the login form i created, which calls authClient.signIn.magicLink() I get the error Not found: /api/auth/sign-in/magic-link. No where in the tutorials is it mentioned what needs to exist at this endpoint. I can't find any mention of the this route in the codebase. What am I missing?
Solution:
Are you sure you followed these steps: https://www.better-auth.com/docs/installation#mount-handler ? This makes sure all routes belonging to better-auth are handled by better-auth
Installation | Better Auth
Learn how to configure Better Auth in your project.
Jump to solution
2 Replies
Solution
Lick A Brick
Lick A Brick2d ago
Are you sure you followed these steps: https://www.better-auth.com/docs/installation#mount-handler ? This makes sure all routes belonging to better-auth are handled by better-auth
Installation | Better Auth
Learn how to configure Better Auth in your project.
Eric
EricOP2d ago
Thanks for pointing me in the right direction! I did follow that step, but my hooks file was in the wrong place.

Did you find this page helpful?