Skip to content

xport login

Terminal window
xport login
xport auth
xport logout

xport 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.

Command Description
xport login Run the browser login flow, store tokens
xport auth Show login status (valid / expired / refreshable)
xport logout Delete stored credentials
  • An explicit relay.token in the config always wins.
  • Otherwise, a valid login token is sent automatically when you run xport <port>, xport <file>, xport <folder>, or xport receive.
  • Access tokens expire (12 h by default); the CLI refreshes them transparently using the stored refresh token (30 d).

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.

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"
Option Description
-h, --help Show help for login

See all options for global flags.