From a21f50fc57089c669099668213b81717ea9b6996 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 30 Jan 2026 11:36:09 +0100 Subject: [PATCH] docs: apply minor fixes from feedback Signed-off-by: Patrik Oldsberg --- docs/auth/index.md | 2 ++ docs/auth/oidc.md | 16 ++++++++++++++-- .../core-services/root-http-router.md | 2 +- .../software-templates/writing-custom-actions.md | 6 +++--- docs/getting-started/index.md | 2 +- docs/notifications/index.md | 3 --- docs/overview/threat-model.md | 2 +- docs/plugins/proxying.md | 3 +++ docs/tooling/cli/03-commands.md | 2 +- docs/tooling/package-metadata.md | 4 ++-- 10 files changed, 28 insertions(+), 14 deletions(-) diff --git a/docs/auth/index.md b/docs/auth/index.md index 1d668f6961..71d205cc01 100644 --- a/docs/auth/index.md +++ b/docs/auth/index.md @@ -211,6 +211,8 @@ to get the existing session, which is exactly what the `ProxiedSignInPage` does. thing you need to do to configure the `ProxiedSignInPage` is to pass the ID of the provider like this: ```tsx title="packages/app/src/App.tsx" +import { ProxiedSignInPage } from '@backstage/core-components'; + const app = createApp({ components: { SignInPage: props => , diff --git a/docs/auth/oidc.md b/docs/auth/oidc.md index 55827ab1dc..7754c4089d 100644 --- a/docs/auth/oidc.md +++ b/docs/auth/oidc.md @@ -136,7 +136,15 @@ auth: - resolver: emailMatchingUserEntityProfileEmail ``` -If none of the built-in resolvers are suitable, you can alternatively write a custom resolver. See an example below: +If none of the built-in resolvers are suitable, you can alternatively write a custom resolver. + +First, install the OIDC provider module: + +```bash +yarn ./packages/backend add @backstage/plugin-auth-backend-module-oidc-provider +``` + +Then create a custom resolver as shown below: ```ts title="in packages/backend/src/index.ts" /* highlight-add-start */ @@ -146,6 +154,10 @@ import { createOAuthProviderFactory, } from '@backstage/plugin-auth-node'; import { oidcAuthenticator } from '@backstage/plugin-auth-backend-module-oidc-provider'; +import { + stringifyEntityRef, + DEFAULT_NAMESPACE, +} from '@backstage/catalog-model'; const myAuthProviderModule = createBackendModule({ // This ID must be exactly "auth" because that's the plugin it targets @@ -168,7 +180,7 @@ const myAuthProviderModule = createBackendModule({ async signInResolver(info, ctx) { const userRef = stringifyEntityRef({ kind: 'User', - name: info.result.userinfo.sub, + name: info.result.fullProfile.userinfo.sub, namespace: DEFAULT_NAMESPACE, }); return ctx.issueToken({ diff --git a/docs/backend-system/core-services/root-http-router.md b/docs/backend-system/core-services/root-http-router.md index 9c2c60957f..2f7f324005 100644 --- a/docs/backend-system/core-services/root-http-router.md +++ b/docs/backend-system/core-services/root-http-router.md @@ -164,7 +164,7 @@ Note that requests towards `/api/*` will never be handled by the `routes` handle The root HTTP Router service also allows for configuration of the underlying Node.js HTTP server object. This is useful for modifying settings on the HTTP server itself, such as server [`timeout`](https://nodejs.org/api/http.html#servertimeout), [`keepAliveTimeout`](https://nodejs.org/api/http.html#serverkeepalivetimeout), and [`headersTimeout`](https://nodejs.org/api/http.html#serverheaderstimeout). -A `applyDefaults` helper is also made available to use the default app/router configuration while still enabling custom server configuration +An `applyDefaults` helper is also made available to use the default app/router configuration while still enabling custom server configuration ```ts import { rootHttpRouterServiceFactory } from '@backstage/backend-defaults/rootHttpRouter'; diff --git a/docs/features/software-templates/writing-custom-actions.md b/docs/features/software-templates/writing-custom-actions.md index 1a64406b04..7e0ee1c5a9 100644 --- a/docs/features/software-templates/writing-custom-actions.md +++ b/docs/features/software-templates/writing-custom-actions.md @@ -91,8 +91,8 @@ The `createTemplateAction` takes an object which specifies the following: may ship with the `scaffolder-backend` plugin. - `description` - An optional field to describe the purpose of the action. This will populate in the `/create/actions` endpoint. -- `schema.input` - A `zod` or JSON schema object for input values to your function -- `schema.output` - A `zod` or JSON schema object for values which are output from the +- `schema.input` - A `zod` schema object for input values to your function +- `schema.output` - A `zod` schema object for values which are output from the function using `ctx.output` - `handler` - the actual code which is run as part of the action, with a context @@ -195,7 +195,7 @@ argument. It looks like the following: executed successfully on the previous run. - `ctx.logger` - a [LoggerService](../../backend-system/core-services/logger.md) instance for additional logging inside your action - `ctx.workspacePath` - a string of the working directory of the template run -- `ctx.input` - an object which should match the `zod` or JSON schema provided in the +- `ctx.input` - an object which should match the `zod` schema provided in the `schema.input` part of the action definition - `ctx.output` - a function which you can call to set outputs that match the `zod` schema in `schema.output` for ex. `ctx.output('downloadUrl', myDownloadUrl)` diff --git a/docs/getting-started/index.md b/docs/getting-started/index.md index c7aabb7bd5..d7c4ee96c8 100644 --- a/docs/getting-started/index.md +++ b/docs/getting-started/index.md @@ -81,7 +81,7 @@ This guide also assumes a basic understanding of working on a Linux based operat - Using `nvm` (recommended) - [Installing nvm](https://github.com/nvm-sh/nvm#install--update-script) - [Install and change Node version with nvm](https://nodejs.org/en/download/package-manager/#nvm) - - Node 24 is a good starting point, this can be installed using `nvm install lts/krypton` + - Node 22 or 24 are recommended, these can be installed using `nvm install 22` or `nvm install 24` - [Binary Download](https://nodejs.org/en/download/) - [Package manager](https://nodejs.org/en/download/package-manager/) - [Using NodeSource packages](https://github.com/nodesource/distributions/blob/master/README.md) diff --git a/docs/notifications/index.md b/docs/notifications/index.md index dce58d3214..3d7dc0eaac 100644 --- a/docs/notifications/index.md +++ b/docs/notifications/index.md @@ -147,9 +147,6 @@ add the `UserNotificationSettingsCard` to your frontend. ```tsx title="packages/app/src/App.tsx" }> - - -