diff --git a/.changeset/kind-shrimps-yell.md b/.changeset/kind-shrimps-yell.md new file mode 100644 index 0000000000..b2ca801c17 --- /dev/null +++ b/.changeset/kind-shrimps-yell.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-auth-backend-module-guest-provider': patch +--- + +Ensure that the config schema is present diff --git a/docs/auth/guest/provider.md b/docs/auth/guest/provider.md index 292b423199..b28274d2ba 100644 --- a/docs/auth/guest/provider.md +++ b/docs/auth/guest/provider.md @@ -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: {} ``` diff --git a/plugins/auth-backend-module-guest-provider/package.json b/plugins/auth-backend-module-guest-provider/package.json index 46ef0d96d7..478d041724 100644 --- a/plugins/auth-backend-module-guest-provider/package.json +++ b/plugins/auth-backend-module-guest-provider/package.json @@ -1,10 +1,10 @@ { "name": "@backstage/plugin-auth-backend-module-guest-provider", - "description": "The guest-provider backend module for the auth plugin.", "version": "0.1.0-next.0", - "main": "src/index.ts", - "types": "src/index.ts", - "license": "Apache-2.0", + "description": "The guest-provider backend module for the auth plugin.", + "backstage": { + "role": "backend-plugin-module" + }, "publishConfig": { "access": "public", "main": "dist/index.cjs.js", @@ -15,17 +15,21 @@ "url": "https://github.com/backstage/backstage", "directory": "plugins/auth-backend-module-guest-provider" }, - "backstage": { - "role": "backend-plugin-module" - }, + "license": "Apache-2.0", + "main": "src/index.ts", + "types": "src/index.ts", + "files": [ + "dist", + "config.d.ts" + ], "scripts": { - "start": "backstage-cli package start", "build": "backstage-cli package build", - "lint": "backstage-cli package lint", - "test": "backstage-cli package test", "clean": "backstage-cli package clean", + "lint": "backstage-cli package lint", "prepack": "backstage-cli package prepack", - "postpack": "backstage-cli package postpack" + "postpack": "backstage-cli package postpack", + "start": "backstage-cli package start", + "test": "backstage-cli package test" }, "dependencies": { "@backstage/backend-common": "workspace:^", @@ -41,7 +45,5 @@ "@backstage/config": "workspace:^", "express": "^4.18.2" }, - "files": [ - "dist" - ] + "configSchema": "config.d.ts" }