#Authentication on Astro website works locally, but does not work when deployed on Netlify or Firebas
1 messages · Page 1 of 1 (latest)
Hmm, I don't know enough to give you a confident answer yet. However, based on the information provided, it seems like there might be an issue with the way your headers are being passed in the deployed version of your application.
The signin.ts file in your Astro project is expecting an Authorization token in the request headers. If the token is not found, it returns a "No token found" response. This is why you're seeing this response when you try to authenticate in the deployed version of your application.
You mentioned that you have tried configuring the headers in your netlify.toml file and _headers file, but it didn't seem to help. It might be worth double-checking these configurations to ensure they are correct.
You could also try looking into Netlify's documentation on headers (https://developers.cloudflare.com/pages/platform/headers/) and redirects (https://developers.cloudflare.com/pages/platform/redirects/), as well as how to define routes that should invoke functions (https://developers.cloudflare.com/pages/platform/functions/routing/#function-invocation-routes).