9 months ago
Hi Railway team! I'm experiencing intermittent authentication issues with my FastAPI app deployed on Railway that only happen in production (works perfectly locally).
The app randomly throws authentication errors even for authenticated users, suggesting cookie/session management issues specific to Railway's environment. network error
3 Replies
9 months ago
Apologies but this looks like an issue with the application level code. Due to volume, we can only answer platform level issues.
I've made this thread public so that the community might be able to help with you query.
Status changed to Awaiting User Response Railway • 9 months ago
9 months ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open jake • 9 months ago
9 months ago
Can you please share the exact error you are running into? You have mentioned authentication issues but that is a broad umbrella
9 months ago
Are you cross origin? If so, do you have these flags set secure=True and samesite='none'
Here's an example: https://stackoverflow.com/questions/64139023/how-to-set-cookies-with-fastapi-for-cross-origin-requests
Please refer to FastAPI documentation as well as they will have explicit steps there