xport login
xport loginxport authxport logoutxport login opens your browser and asks you to sign in to your xPort
account. After you approve, the CLI stores the issued tokens on your
machine and uses them automatically for tunnel and share sessions.
The flow is OAuth2 authorization-code with PKCE (RFC 7636): no client
secret ships with the CLI, and the browser talks to a temporary
127.0.0.1 callback — the same model as gh auth login.
Commands
Section titled “Commands”| Command | Description |
|---|---|
xport login |
Run the browser login flow, store tokens |
xport auth |
Show login status (valid / expired / refreshable) |
xport logout |
Delete stored credentials |
How the token is used
Section titled “How the token is used”- An explicit
relay.tokenin the config always wins. - Otherwise, a valid login token is sent automatically when you run
xport <port>,xport <file>,xport <folder>, orxport receive. - Access tokens expire (12 h by default); the CLI refreshes them transparently using the stored refresh token (30 d).
Storage
Section titled “Storage”Credentials live in auth.json next to your config file
(e.g. ~/.config/xport/auth.json on Linux,
~/Library/Application Support/xport/auth.json on macOS) with 0600
permissions.
Self-hosting
Section titled “Self-hosting”Point auth.web_url and auth.client_id at your own account server
(defaults target the hosted service at xport.dev):
auth: web_url: "https://accounts.example.com" client_id: "xport-cli"On the relay, enable OAuth validation with:
auth: mode: "oauth" introspect_url: "https://accounts.example.com/oauth/introspect" cache_ttl: "60s"Options
Section titled “Options”| Option | Description |
|---|---|
-h, --help |
Show help for login |
See all options for global flags.

