Setting FLAGSMITH_API_KEY against a self-hosted instance does nothing, and the error tells you to do exactly what you just did:
➜ dev flagsmith init --api-url https://flagsmith.example.com
➜ dev export FLAGSMITH_API_KEY=…
➜ dev flagsmith project list
Error: not logged in
Run `flagsmith login`, or set FLAGSMITH_API_KEY for non-interactive use.
Three changes to fix this:
- When the unscoped variable is set but ignored, say so and name the variable to use, rather than reporting
not logged in.
- Make
hintLogin name the scoped variable whenever the instance isn't the default host.
- Document the host-scoped form and the reason for it in the README's credentials section.
Reported by a self-hosted user in Slack, who was left with a working key and no way to use it.
Setting
FLAGSMITH_API_KEYagainst a self-hosted instance does nothing, and the error tells you to do exactly what you just did:Three changes to fix this:
not logged in.hintLoginname the scoped variable whenever the instance isn't the default host.Reported by a self-hosted user in Slack, who was left with a working key and no way to use it.