Skip to content

CLI tokens are not refreshed after expiry #4

Description

@ndeybach

When doing some operations like eg:

xata-cli branch list

you get:

Error: Your Xata session has expired. Please use `xata auth login` to log in again.

Once the stored token expires, CLI commands do not refresh it automatically.

The practical workaround is to log out and log in again. .... but this shouldn't be necessary.

Which is not ideal at all and a pain.


Related command:

xata auth refresh-token

This command appears to print the stored refresh token, not force refresh the current session token like its name would suggest.


Additional context:

The original observed failure was xata branch list, and it still failed when XATA_ORGANIZATION_ID and XATA_PROJECT_ID were set. The issue appears broader than branch list: the CLI needs either automatic token refresh and/or an explicit manual refresh command.

Version of cli used: 1.5.4

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions