Page not found when the callback url for the authentication is called

hey friends,

my site is
it’s a svelte web app

the button on the top right corner redirects to a discord Oauth2 link, when the authentication is successful the callback url (/auth/callback) which contains the code that i need to store the user’s details in cookies gives a Page not found error

additionally, none of the other routes work, except for /api/auth, which is the login button.

i tried redirects, this is my netlify.toml

  from = "/auth/callback*"
  to = "/"
  status = 200
  force = true
  query = {code = ":code"}

works but the authentication is never done, since it never executes the code inside /auth/callback, it just redirects to the homepage.

i read the other topics with problems similar to mine, but none fixed my problem,

any ideas? i would really appreciate the help :slight_smile:

Hi there,

Did you see this guide yet? This is the best place to start for “Page Not Found” issues.

If you are still seeing issues after following the troubleshooting steps in there, please check out this Support Guide as well. It outlines all of our build and deploy resources and will get you on the right track :slight_smile:

If none of the above resources help, please write back with your site name and what steps you have tried and we can look into this further!

Hey Sam! I’m facing the same issue but this guide doesn’t helped :frowning:

Hi :wave:t6: welcome to the forums! Can you share your site that is experiencing a page not found error?