a month ago
For the last few days, the Railway CLI has been asking for authentication with almost every new terminal session.
This was not the case just a few days ago. What can I do to make it stay authenticated? It's really annoying to do the Auth step over and over again.
I've tried to create a token and use that.
Also, the https://railway.com/activate route
10 Replies
Status changed to Awaiting Railway Response Railway • about 1 month ago
a month ago
Thanks for the report. We're tracking this issue but don't have an ETA for a resolution yet.
Status changed to Awaiting User Response Railway • about 1 month ago
a month ago
We're aware of an issue with CLI sessions not persisting for certain actions after a recent authentication update. A fix is being worked on. Can you confirm which version of the CLI you are using ( railway --version) -- 4.39.0 is the latest?
What happened when you tried to create a token? Did you set the RAILWAY_API_TOKEN environment variable in your shell profile (e.g., .bashrc or .zshrc) so it persists across sessions without requiring railway login?
a month ago
I'm using railway 4.38.0 version.
I tried the RAILWAY_API_TOKEN approach, but LLM complained that there were not enough access to list projects and the token AUTH is no good for that.
Status changed to Awaiting Railway Response Railway • about 1 month ago
a month ago
You would want to be using a token that is not scoped to any single workspace.
Status changed to Awaiting User Response Railway • about 1 month ago
a month ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 28 days ago
24 days ago
It still keeps happening.
```
railway --version
railway 4.43.0
```
Doing the auth with railway login
Status changed to Awaiting Railway Response Railway • 24 days ago
Status changed to Awaiting User Response Railway • 21 days ago
14 days ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 14 days ago
noahd
Just to clarify, are you still actively running into this issue?
10 days ago
Yes, i do. Still authenticating multiple times per day across at least 2 machines on mac OS.
For some reason i did not receive notification about the question
Status changed to Awaiting Railway Response Railway • 10 days ago
7 days ago
Thanks for sticking with us on this and for the screenshots.
Tracked this down to a server-side OAuth bug — your CLI's refresh token points at a grant the server can't resolve, so it falls back to prompting login. Not specific to your setup.
The fix for this has been drafted and is in review and should ship soon. Sorry for the annoyance in the meantime!
If you want a workaround, RAILWAY_API_TOKEN works — just make sure the token isn't scoped to a single workspace (Account Settings → Tokens, leave workspace unselected). That was the listing issue you hit earlier.
Status changed to Awaiting User Response Railway • 7 days ago
