Intermittent Authentication Middleware Failures in Production - Cookie/Session Issues
mat1312
PROOP

a year 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

$10 Bounty

3 Replies

a year 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 about 1 year ago


a year 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 about 1 year ago


sim
FREE

a year ago

Can you please share the exact error you are running into? You have mentioned authentication issues but that is a broad umbrella


sim
FREE

a year 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


Welcome!

Sign in to your Railway account to join the conversation.

Loading...