Merge pull request #23347 from backstage/freben/guest

ensure that the guest auth config schema is present
This commit is contained in:
Fredrik Adelöw
2024-03-01 11:15:21 +01:00
committed by GitHub
3 changed files with 36 additions and 25 deletions
+15 -11
View File
@@ -25,17 +25,19 @@ This will only work with the new backend system. There is no support for this in
Add the `@backstage/plugin-auth-backend-module-guest-provider` to your backend installation.
```
```sh
# From your Backstage root directory
yarn --cwd packages/backend add @backstage/plugin-auth-backend-module-guest-provider
```
Then, add it to your backend's `index.ts` file,
Then, add it to your backend's source,
```diff
```ts title="packages/backend/src/index.ts"
const backend = createBackend();
backend.add('@backstage/plugin-auth-backend');
+backend.add('@backstage/plugin-auth-backend-module-guest-provider');
backend.add(import('@backstage/plugin-auth-backend'));
// highlight-add-next-line
backend.add(import('@backstage/plugin-auth-backend-module-guest-provider'));
await backend.start();
```
@@ -44,10 +46,11 @@ await backend.start();
Add the following to your `SignInPage` providers,
```diff
```ts
const providers = [
+ 'guest',
...
// highlight-add-next-line
'guest',
...
]
```
@@ -55,8 +58,9 @@ const providers = [
Similar to the other authentication providers, you have to enable the provider in config. Add the following to your `app-config.local.yaml`,
```diff
```yaml title="app-config.local.yaml"
auth:
providers:
+ guest: {}
providers:
# highlight-add-next-line
guest: {}
```