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:
| Tab | Holds |
|---|---|
| Profile | Your username and your account. |
| Tokens | Access tokens, one for each devserver. |
| Devservers | Your 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 to | Run |
|---|---|
| Let one person in | user create --email bob@example.com, then flag grant oauth_login bob@example.com |
| Show their Devservers tab | flag grant share_workspaces bob@example.com |
| Let in anyone with an account at your sign-in provider | flag create oauth_login --default-on |
| Keep one person out while the default is on | flag grant oauth_login bob@example.com --disabled |
| See whose access differs from the default | flag overrides oauth_login |
| Return a person to the default | flag revoke oauth_login bob@example.com |
| Block an account | user 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_workspacesshows or hides the Devservers tab and nothing more. - A block revokes every token of the account and refuses its sign-ins.
user unblocklets 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
--jsonand the exit codes, are on Operate.