From c38a71f855ff11d1185fdc5022a2007861178df1 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Sun, 29 Mar 2026 21:32:52 +0200 Subject: [PATCH] docs: migrate OIDC auth docs to new frontend system Signed-off-by: Patrik Oldsberg Made-with: Cursor Signed-off-by: Patrik Oldsberg Made-with: Cursor --- docs/auth/oidc.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/auth/oidc.md b/docs/auth/oidc.md index 46094f5a99..3138a763d9 100644 --- a/docs/auth/oidc.md +++ b/docs/auth/oidc.md @@ -190,7 +190,6 @@ Since OIDC does not have a built-in auth API ref in `@backstage/core-plugin-api` import { createApp } from '@backstage/frontend-defaults'; /* highlight-add-start */ import { - createApiRef, OpenIdConnectApi, ProfileInfoApi, BackstageIdentityApi, @@ -200,6 +199,7 @@ import { OAuth2 } from '@backstage/core-app-api'; import { SignInPageBlueprint } from '@backstage/plugin-app-react'; import { SignInPage } from '@backstage/core-components'; import { + createApiRef, createFrontendModule, configApiRef, discoveryApiRef, @@ -209,7 +209,7 @@ import { const keycloakAuthApiRef = createApiRef< OpenIdConnectApi & ProfileInfoApi & BackstageIdentityApi & SessionApi ->({ +>().with({ id: 'auth.keycloak', }); @@ -269,7 +269,7 @@ export default createApp({ }); ``` -The `id` of the API ref, as well as the `provider.id` used in the `SignInPage` configuration (for example, `'keycloak-auth-provider'` in the snippet above), can be customized. However, the `provider.id` passed to `OAuth2.create({ provider: { id } })` must remain `'oidc'` to match Backstage's generic OIDC auth strategy on the backend. +The `id` of the API ref (e.g. `'auth.keycloak'`) and the `id` used in the `SignInPage` provider configuration (e.g. `'keycloak-auth-provider'`) can be customized. However, the `provider.id` passed to `OAuth2.create` must remain `'oidc'` to match Backstage's generic OIDC auth strategy on the backend. :::note Note You can configure sign-in to use a redirect flow with no pop-up by adding `enableExperimentalRedirectFlow: true` to the root of your `app-config.yaml`.