gln profile auth login revolut
Authorize a Revolut profile.
Synopsis
gln [global-options] profile auth login revolut
gln [global-options] profile auth login revolut
--code <code> --expected-state <state> --received-state <state>
Options
| Argument or flag | Type | Required | Default | Description |
|---|---|---|---|---|
--code | string | yes for non-interactive exchange | - | Authorization code returned by Revolut. |
--expected-state | string | yes for non-interactive exchange | - | OAuth state value the caller expected. |
--received-state | string | yes for non-interactive exchange | - | OAuth state value received with the authorization code. |
Description
Opens the active Revolut profile through the public C API and completes the OAuth authorization-code exchange.
Without --code, the CLI generates an OAuth state value, asks the public C API
for the provider authorization URL, opens the default browser, and waits on the
loopback redirect URI configured on the profile. The redirect must be an
http://localhost:<port>/... or http://127.0.0.1:<port>/... URL.
If the browser cannot be opened, the command returns an error with the
non-interactive exchange shape and does not print the authorization URL.
With --code, all three non-interactive fields are required. The CLI passes
--expected-state and --received-state to the public C API exchange request;
the exchange fails if they differ.
JSON output never includes access tokens, refresh tokens, private keys, client assertions, or authorization URLs.
Requirements
- Profile: required
- Credential type: Revolut OAuth client certificate/private key plus OAuth code
- Backend prerequisites: Revolut profile
- Input mode: Browser loopback redirect, or explicit non-interactive code and state input.
Status and exit codes
| Status | Exit | Meaning | Continuation |
|---|---|---|---|
ok | 0 | OAuth exchange completed and status returned. | - |
error | 1 | Profile, redirect, state, or provider failure. | - |
Result keys: have_token, expires_at_unix_ms, needs_refresh, scope, last_error
Examples
gln --profile rev profile auth login revolut
gln --profile rev profile auth login revolut `
--code oa_sand_xxx `
--expected-state expected-state `
--received-state expected-state