diff --git a/packages/frontend-plugin-api/report.api.md b/packages/frontend-plugin-api/report.api.md index 17ef32131c..d95634988c 100644 --- a/packages/frontend-plugin-api/report.api.md +++ b/packages/frontend-plugin-api/report.api.md @@ -20,7 +20,6 @@ import { Observable } from '@backstage/types'; import { PropsWithChildren } from 'react'; import { ReactNode } from 'react'; import { RouteRef as RouteRef_2 } from '@backstage/frontend-plugin-api'; -import { SignInPageProps } from '@backstage/core-plugin-api'; import { z } from 'zod'; // @public @@ -2013,6 +2012,12 @@ export const SignInPageBlueprint: ExtensionBlueprint<{ }; }>; +// @public +export type SignInPageProps = { + onSignInSuccess(identityApi: IdentityApi): void; + children?: ReactNode; +}; + // @public export interface StorageApi { forBucket(name: string): StorageApi; diff --git a/packages/frontend-plugin-api/src/blueprints/SignInPageBlueprint.tsx b/packages/frontend-plugin-api/src/blueprints/SignInPageBlueprint.tsx index 5e4112a8d1..b28a0108ca 100644 --- a/packages/frontend-plugin-api/src/blueprints/SignInPageBlueprint.tsx +++ b/packages/frontend-plugin-api/src/blueprints/SignInPageBlueprint.tsx @@ -14,10 +14,27 @@ * limitations under the License. */ -import { ComponentType, lazy } from 'react'; +import { ComponentType, lazy, ReactNode } from 'react'; import { createExtensionBlueprint, createExtensionDataRef } from '../wiring'; -import { SignInPageProps } from '@backstage/core-plugin-api'; import { ExtensionBoundary } from '../components'; +import { IdentityApi } from '../apis'; + +/** + * Props for the `SignInPage` component. + * + * @public + */ +export type SignInPageProps = { + /** + * Set the IdentityApi on successful sign-in. This should only be called once. + */ + onSignInSuccess(identityApi: IdentityApi): void; + + /** + * The children to render. + */ + children?: ReactNode; +}; const componentDataRef = createExtensionDataRef< ComponentType diff --git a/packages/frontend-plugin-api/src/blueprints/index.ts b/packages/frontend-plugin-api/src/blueprints/index.ts index c8699b4232..379c8d237b 100644 --- a/packages/frontend-plugin-api/src/blueprints/index.ts +++ b/packages/frontend-plugin-api/src/blueprints/index.ts @@ -30,7 +30,10 @@ export { export { NavItemBlueprint } from './NavItemBlueprint'; export { PageBlueprint } from './PageBlueprint'; export { RouterBlueprint } from './RouterBlueprint'; -export { SignInPageBlueprint } from './SignInPageBlueprint'; +export { + type SignInPageProps, + SignInPageBlueprint, +} from './SignInPageBlueprint'; export { ThemeBlueprint } from './ThemeBlueprint'; export { TranslationBlueprint } from './TranslationBlueprint'; export { SwappableComponentBlueprint } from './SwappableComponentBlueprint'; diff --git a/plugins/app/report.api.md b/plugins/app/report.api.md index 2bcd7550a3..313d09cfee 100644 --- a/plugins/app/report.api.md +++ b/plugins/app/report.api.md @@ -20,7 +20,7 @@ import { OverridableExtensionDefinition } from '@backstage/frontend-plugin-api'; import { OverridableFrontendPlugin } from '@backstage/frontend-plugin-api'; import { ReactNode } from 'react'; import { RouteRef } from '@backstage/frontend-plugin-api'; -import { SignInPageProps } from '@backstage/core-plugin-api'; +import { SignInPageProps } from '@backstage/frontend-plugin-api'; import { SwappableComponentRef } from '@backstage/frontend-plugin-api'; import { TranslationMessages } from '@backstage/frontend-plugin-api'; import { TranslationResource } from '@backstage/frontend-plugin-api';