{
"authProvider": {
"type": "dev",
"loginBaseUrl": "http://login.demo.localhost:3000",
"cookieDomain": "demo.localhost"
},
"routes": [{
"host": "app.demo.localhost",
"path": "/*",
"frontend": true,
"backend": "http://127.0.0.1:8080",
"auth": {},
"userBadge": {
"position": "right",
"claims": ["preferred_username", "email"],
"logoutLabel": "Sign out"
}
}]
}Getting started
This example runs entirely on your machine: no identity provider and
no external service. It uses the embedded dev provider, which is
loopback-only and must never be used in production.
File
Run it
The packaged demo starts the static site and Gate One together (no Docker):
cd gate-one-src/deploy/local/getting-started
BIN_DIR=~/gate-one-bin ./run.shThe script prints the URLs and stops with ./run.sh down. See [deploy/local/getting-started](https://github.com/clad-one/gate-one/tree/main/deploy/local/getting-started) for the stack and its README.
To run it by hand instead:
You need a small HTTP server on port 8080. Any static server works:
# terminal 1: the application
python3 -m http.server 8080
# terminal 2: Gate One
gate-one -check -config routes.json
gate-one -config routes.jsonDefault users
No signup is required. The embedded dev provider creates two test
accounts:
| User | Password | Role |
|---|---|---|
|
|
|
|
|
|
Open http://app.demo.localhost:3000 and log in with one of them.
.localhost resolves to loopback on modern systems.
To add another development user, declare it in
authProvider.dev.users.
The dev provider is loopback-only; for a real deployment, use an OIDC
provider.
What to look at
the redirect to the dedicated
login.demo.localhosthost;the shared
demo.localhostsession cookie;the user badge in the top-right corner and its logout button;
the
-checkoutput: routes, provider type, login URL.
Next
Replace the dev block with a real oidc provider; see
multi-app SSO.