Skip to content

GatewayUse

Accounts and OAuth2 sign-in

Let yourself in, set your username, and choose who else may sign in to the gateway you host.

Let yourself in

A new self-hosted gateway lets nobody sign in. Two flags are off for every account until you grant them: oauth_login lets an account sign in, and share_workspaces shows its Devservers tab. Grant both to your own email, the one your sign-in provider account uses. As root, load the admin credentials the setup script wrote, then:

#set -a; . /etc/chan-gateway/admin.env; set +a chan-gateway-admin user create --email you@example.com chan-gateway-admin flag grant oauth_login you@example.com chan-gateway-admin flag grant share_workspaces you@example.com

Open https://gw.example.com and sign in. The account page has three tabs:

TabHolds
ProfileYour username and your account.
TokensAccess tokens, one for each devserver.
DevserversYour devservers and their shares, and the devservers shared with you.

Set your username

Your username starts as a placeholder, and it is part of every devserver address. Change it in the Profile tab before you share anything: renames are limited to four, and each one disconnects your devservers.

Who can sign in with OAuth2

With the admin credentials loaded, each of these is one chan-gateway-admin command:

You want toRun
Let one person inuser create --email bob@example.com, then flag grant oauth_login bob@example.com
Show their Devservers tabflag grant share_workspaces bob@example.com
Let in anyone with an account at your sign-in providerflag create oauth_login --default-on
Keep one person out while the default is onflag grant oauth_login bob@example.com --disabled
See whose access differs from the defaultflag overrides oauth_login
Return a person to the defaultflag revoke oauth_login bob@example.com
Block an accountuser block bob@example.com --reason "..."
Details and limits
  • A refused sign-in still creates the account, so a grant by email also works once the person has tried to sign in.
  • identity enforces only oauth_login. share_workspaces shows or hides the Devservers tab and nothing more.
  • A block revokes every token of the account and refuses its sign-ins. user unblock lets it sign in again; its tokens stay revoked.
  • An account is found by its uuid, its email, or its username, tried in that order.
  • More commands, with --json and the exit codes, are on Operate.

Next