Getting started

A local demo with the embedded development identity provider.

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

{
  "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"
    }
  }]
}

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.sh

The 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.json

Default users

No signup is required. The embedded dev provider creates two test accounts:

UserPasswordRole

alice

alice

user

bob

bob

admin

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.localhost host;

  • the shared demo.localhost session cookie;

  • the user badge in the top-right corner and its logout button;

  • the -check output: routes, provider type, login URL.

Next

Replace the dev block with a real oidc provider; see multi-app SSO.