Skip to main content

Module connect

Module connect 

Source
Expand description

Connecting another Runlight to this one (a hub) without copying a token: this server registers itself with the install’s OAuth server, sends the owner to that install’s consent page, and on the way back swaps the code for a manage token, limited there to the one site the owner picked.

Enums§

ConnectFailure
What starting or finishing a connection can end in besides its answer: a ConnectError with its code, or Runlight’s own error (the database, or adding the site).

Functions§

finish_connect
Finishes connecting when the owner comes back from the consent page. Returns the site’s id here.
install_url
The install’s address as its dashboard is, without a trailing slash. local allows an install on this machine, at http://localhost or http://127.0.0.1.
start_connect
Starts connecting: returns the address of the install’s consent page. back is where the install sends the owner afterwards, and site which of its sites to offer first (“” for none).

Type Aliases§

ConnectError
Why connecting failed, as a code the dashboard says in its own words. The first four (expired, denied, refused, and token) come back from the consent page, the rest (url, unreachable, not_runlight, endpoints, old, and register) from starting.