Manage database configs
Logto helps to maintain some technical configs, such as OIDC and Cookie keys. Before we can managing them via Admin Console or Management API, you can use CLI to achieve the goal.
Get config by keyโ
Usage:
- CLI
- npx
logto db config get <key> [keys...]
npx @logto/cli db config get <key> [keys...]
Say you want to get the OIDC private keys:
- CLI
- npx
logto db config get oidc.privateKeys
npx @logto/cli db config get oidc.privateKeys
The output will be like:
oidc.privateKeys=["\n-----BEGIN PRIVATE KEY-----\nMIIJRAIBA..."]
Run logto db config get --help
for all available keys, or see Configuration for detailed explanation.
Set config by keyโ
- CLI
- npx
logto db config set <key> [keys...]
npx @logto/cli db config set <key> [keys...]
Say you want to set the OIDC Cookie keys:
- CLI
- npx
logto db config set oidc.cookieKeys "[\"key1\",\"key2\"]"
npx @logto/cli db config set oidc.cookieKeys "[\"key1\",\"key2\"]"
Normally, the value to set should be a valid JSON string, and follows the pre-defined type definition. Run logto db config set --help
for all available keys, or see Configuration for detailed explanation.