backend-common: expand secret generation changeset

Signed-off-by: MT Lewis <mtlewis@users.noreply.github.com>
This commit is contained in:
MT Lewis
2021-12-21 10:18:22 +00:00
parent 4320aea879
commit 6fe4f20cbd
+10 -1
View File
@@ -2,4 +2,13 @@
'@backstage/backend-common': minor
---
Generate backend-to-backend secret for dev mode
Auto-generate secrets for backend-to-backend auth in local development environments.
When NODE_ENV is 'development', the ServerTokenManager will now generate a secret for backend-to-backend auth to make it simpler to work locally on Backstage instances that use backend-to-backend auth. A secret must still be manually configured as described in [the backend-to-backend auth tutorial](https://backstage.io/docs/tutorials/backend-to-backend-auth).
After the change, the static `fromConfig` method on the `ServerTokenManager` requires a logger.
```diff
- const tokenManager = ServerTokenManager.fromConfig(config);
+ const tokenManager = ServerTokenManager.fromConfig(config, { logger: root });
```