Railway CLI needs login everyday
abeshunyah
HOBBYOP

3 months ago

Railway CLI requires me to login everyday.

This is annoying to me.

It logs user out everyday? Is it intended behaviour?

Solved$10 Bounty

10 Replies

Status changed to Awaiting Railway Response Railway • 3 months ago


sam-a
EMPLOYEE

3 months ago

No, daily logout is not intended. CLI sessions use refresh tokens with a one-year lifetime, so a single railway login should persist without re-authentication.


Status changed to Awaiting User Response Railway • 3 months ago


abeshunyah
HOBBYOP

3 months ago

(this is mistake reply. leave it because i cannot delete this)


Status changed to Awaiting Railway Response Railway • 3 months ago


Railway
BOT

3 months ago

This thread has been opened as a bounty so the community can help solve it.

Status changed to Open Railway • 3 months ago


Are you deleting the .railway folder in your home directory?


0x5b62656e5d

Are you deleting the `.railway` folder in your home directory?

abeshunyah
HOBBYOP

3 months ago

No. I have never touched it.

There it is.


sam-a

No, daily logout is not intended. CLI sessions use refresh tokens with a one-year lifetime, so a single `railway login` should persist without re-authentication.

abeshunyah
HOBBYOP

3 months ago

No persistence for my macbook.

when railway whoami it says

Warning: failed to refresh OAuth token: Token refresh failed: invalid_grant: grant request is invalid. Please run `railway login` again.

Unauthorized. Please run `railway login` again.

always.

any idea to fix?


Try deleting the folder and log in again.


3 months ago

Anecdotally, I'm having to railway loginmaybe 8 or 9 times a day (across one or two projects). Whereas something like a wrangleror gcloudworks globally. Agents using railwaycommands are hitting this issue a lot.


0x5b62656e5d

Try deleting the folder and log in again.

abeshunyah
HOBBYOP

3 months ago

I tried but not worked.

Same thing is happening.


dougwithseismic

Anecdotally, I'm having to `railway login`maybe 8 or 9 times a day (across one or two projects). Whereas something like a `wrangler`or `gcloud`works globally. Agents using `railway`commands are hitting this issue a lot.

abeshunyah
HOBBYOP

3 months ago

Yes railway cli only does not work.

My Claude Code stops because of railway cli not working and ask me login almost everytime, too.


abeshunyah
HOBBYOP

2 months ago

Any solution did not work but looks like recent Railway CLI updates solved this.


Status changed to Solved 0x5b62656e5d • 2 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...