Skip to content

fix(docs): correct nonexistent CLI flags and document --url as required - #88

Merged
lakhansamani merged 4 commits into
mainfrom
fix/nonexistent-cli-flags
Aug 14, 2026
Merged

fix(docs): correct nonexistent CLI flags and document --url as required#88
lakhansamani merged 4 commits into
mainfrom
fix/nonexistent-cli-flags

Conversation

@lakhansamani

@lakhansamanilakhansamani commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Why

Two related classes of bug, both found by checking every --flag in docs/ against the flag list a build of main actually registers.

1. Flags that do not exist

Five appeared in copy-pasteable blocks. The SSO quickstart failed twice before reaching config validation:

$ authorizer serve --database-type postgres --port 8080 --sender-email a@b.com
Error: unknown command "serve" for "authorizer"
$ authorizer --database-type postgres --port 8080 ...
Error: unknown flag: --port
PageWasIs
sso-guideauthorizer serveauthorizer (no such subcommand)
sso-guide--port--http-port
sso-guide--sender-email--smtp-sender-email
databases--couchbase-bucket-ram-quota--couchbase-ram-quota
v1-to-v2--skip-tls-verification--smtp-skip-tls-verification

Also drops --include-permissions-in-token and --authorization-log-all-checks from server-config — both were removed when OpenFGA was embedded, and one was still shown inside a runnable command.

2. --url is required in 2.4.0 and the docs never said so

#764 made --url mandatory. Every page carrying a runnable authorizer command omitted it — 22 of 24 by the first count, and a second detector keyed on --database-type rather than ./authorizer found more in docker.md, fly-io, helm-chart and kubernetes (~40 blocks total), so every documented quickstart, deployment guide and SDK setup produces a server that will not boot — including getting-started, the first command a new user runs.

The precedent is visible in the repo: when --encryption-key became required, every page was swept. --url never got the same sweep.

Adds --url to every block that actually starts a server, matched to context — localhost for local/Docker examples, the platform URL for Railway/Render/Koyeb/Heroku/Fly, the Ingress host for Kubernetes — plus AUTHORIZER_URL rows in the required-variable tables those commands read from.

Deliberately left alone: flag fragments illustrating one setting (the databases.md per-engine snippets), the v1 "before" example in the migration guide, and authorizer mcp, which takes --mcp-authorizer-url and does not require --url — verified by running it.

--url vs --allowed-origins vs authorizerURL

These had no single home, which is the likely source of the omission. Now stated once in security.md:

SettingLives inNames
--urlserver flagThis server's own address
--allowed-originsserver flagThe apps allowed to talk to it
authorizerURLSDK / client optionThe client's pointer back at the server

There is no --authorizer-url server flag, and X-Authorizer-URL is the legacy header --url replaces.

Deduplication

Three pages independently described --url, and all three still called it optional and "recommended for production". security.md is now the single canonical explanation; server-config links to it instead of restating it.

Recorded as a 2.4.0 breaking change in the migration guide, alongside --encryption-key and the delegated-agent deny default — the guide had no 2.3.x→2.4.0 section at all.

Drive-by

Same class of bug: the Kubernetes manifest referenced $(ENCRYPTION_KEY) in args with no matching env entry, so it never expanded.

Verification

  • Every --flag in docs/ diffed against authorizer --help and authorizer mcp --help from a build of main; zero invalid flags remain in command blocks (residual matches are CSS custom properties, curl and kubectl flags)
  • Corrected sso-guide command replayed against the binary — reaches config validation instead of failing to parse
  • npm run build clean, zero broken-link or broken-anchor warnings

Refs authorizerdev/authorizer#764, authorizerdev/authorizer#766, authorizerdev/authorizer#767

Verified every `--flag` in docs/ against the flag list the built binary
actually registers. Five were wrong, all in copy-pasteable blocks:
- sso-guide: `authorizer serve` -> `authorizer` (no such subcommand)
- sso-guide: `--port` -> `--http-port`
- sso-guide: `--sender-email` -> `--smtp-sender-email`
- databases: `--couchbase-bucket-ram-quota` -> `--couchbase-ram-quota`
- v1-to-v2: `--skip-tls-verification` -> `--smtp-skip-tls-verification`
Also drops `--include-permissions-in-token` and
`--authorization-log-all-checks` from server-config: both were removed
when OpenFGA was embedded, and were still shown in a runnable command.
The sso-guide block failed twice before reaching config validation.
#764 made --url mandatory — the server refuses to start without it — but
the docs were never swept. 22 of 24 pages carrying a runnable authorizer
command omitted it, so every documented quickstart, deployment guide and
SDK setup produced a server that will not boot on 2.4.0. That includes
getting-started, the first command a new user runs.
Adds --url to every block that actually starts a server, matching each
page's context (localhost for local/docker examples, the platform URL for
Railway/Render/Koyeb/Heroku/Fly, the Ingress host for Kubernetes), and
adds AUTHORIZER_URL to the required-variable tables that feed those
commands. Left alone: flag fragments that illustrate one setting, the v1
"before" example, and `authorizer mcp`, which takes --mcp-authorizer-url
and does not require --url (verified against a build).
Also states the difference between the three similarly-named settings,
which had no single home and was the likely source of the omission:
--url this server's own address (server flag, required)
--allowed-origins the apps allowed to talk to it (server flag)
authorizerURL the client's pointer back at the server (SDK option)
There is no --authorizer-url server flag; X-Authorizer-URL is the legacy
header --url replaces.
The security.md entry is now the single canonical explanation, with
server-config linking to it rather than restating it — all three copies
still described --url as optional and "recommended for production".
Records the requirement as a 2.4.0 breaking change in the migration
guide, alongside --encryption-key and the delegated-agent deny default.
Drive-by, same class of bug: the Kubernetes manifest referenced
$(ENCRYPTION_KEY) in args with no matching env entry, so it never
expanded.
@netlify

netlifyBot commented Aug 14, 2026

Copy link
Copy Markdown

Deploy Preview for authorizerdev-docs ready!

NameLink
🔨 Latest commitaf9f7ae
🔍 Latest deploy loghttps://app.netlify.com/projects/authorizerdev-docs/deploys/6a7eb07d1096fe0008d1431d
😎 Deploy Previewhttps://deploy-preview-88--authorizerdev-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changesRun an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

--url is required as of 2.4.0 and is consulted before any header, so
--mcp-authorizer-url is ignored whenever --url is set. The stdio example
passed both with DIFFERENT values, which is exactly the trap: the
mcp-authorizer-url value was inert and looked configured.
Removed from the runnable blocks, marked deprecated in the flag table.
Still accepted so existing setups keep starting, but ignored: it only
stamped an x-authorizer-url header, and --url is consulted before any
header. Replaced with --url in the runnable blocks and the flag table.
--mcp-bearer without --url is now refused at startup.
@lakhansamani
lakhansamani merged commit c852ff6 into mainAug 14, 2026
4 checks passed
@lakhansamani
lakhansamani deleted the fix/nonexistent-cli-flags branch August 14, 2026 06:21
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@lakhansamani