diff --git a/plugins/app/package.json b/plugins/app/package.json index d45f08b5df..a14e1eab43 100644 --- a/plugins/app/package.json +++ b/plugins/app/package.json @@ -40,6 +40,7 @@ "@backstage/core-components": "workspace:^", "@backstage/core-plugin-api": "workspace:^", "@backstage/frontend-plugin-api": "workspace:^", + "@backstage/integration-react": "workspace:^", "@backstage/plugin-permission-react": "workspace:^", "@backstage/theme": "workspace:^", "@material-ui/core": "^4.9.13", diff --git a/plugins/app/src/defaultApis.ts b/plugins/app/src/defaultApis.ts index 85c89a6278..b4f6fa0b48 100644 --- a/plugins/app/src/defaultApis.ts +++ b/plugins/app/src/defaultApis.ts @@ -61,6 +61,11 @@ import { vmwareCloudAuthApiRef, } from '@backstage/core-plugin-api'; import { ApiBlueprint } from '@backstage/frontend-plugin-api'; +import { + ScmAuth, + ScmIntegrationsApi, + scmIntegrationsApiRef, +} from '@backstage/integration-react'; import { permissionApiRef, IdentityPermissionApi, @@ -380,4 +385,20 @@ export const apis = [ }), }, }), + ApiBlueprint.make({ + name: 'scm-auth', + params: { + factory: ScmAuth.createDefaultApiFactory(), + }, + }), + ApiBlueprint.make({ + name: 'scm-integrations', + params: { + factory: createApiFactory({ + api: scmIntegrationsApiRef, + deps: { configApi: configApiRef }, + factory: ({ configApi }) => ScmIntegrationsApi.fromConfig(configApi), + }), + }, + }), ] as const; diff --git a/plugins/app/src/extensions/DefaultSignInPage.tsx b/plugins/app/src/extensions/DefaultSignInPage.tsx new file mode 100644 index 0000000000..29b384c7a2 --- /dev/null +++ b/plugins/app/src/extensions/DefaultSignInPage.tsx @@ -0,0 +1,25 @@ +/* + * Copyright 2024 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import React from 'react'; +import { SignInPageBlueprint } from '@backstage/frontend-plugin-api'; +import { SignInPage } from '@backstage/core-components'; + +export const DefaultSignInPage = SignInPageBlueprint.make({ + params: { + loader: async () => props => + , + }, +}); diff --git a/plugins/app/src/extensions/index.ts b/plugins/app/src/extensions/index.ts index 157f7ddb62..22b020a441 100644 --- a/plugins/app/src/extensions/index.ts +++ b/plugins/app/src/extensions/index.ts @@ -24,6 +24,7 @@ export { ComponentsApi } from './ComponentsApi'; export { IconsApi } from './IconsApi'; export { FeatureFlagsApi } from './FeatureFlagsApi'; export { TranslationsApi } from './TranslationsApi'; +export { DefaultSignInPage } from './DefaultSignInPage'; export { DefaultProgressComponent, DefaultErrorBoundaryComponent, diff --git a/plugins/app/src/plugin.ts b/plugins/app/src/plugin.ts index ff0c69faec..18c412bf77 100644 --- a/plugins/app/src/plugin.ts +++ b/plugins/app/src/plugin.ts @@ -34,6 +34,7 @@ import { DefaultErrorBoundaryComponent, oauthRequestDialogAppRootElement, alertDisplayAppRootElement, + DefaultSignInPage, } from './extensions'; import { apis } from './defaultApis'; @@ -58,6 +59,7 @@ export const appPlugin = createFrontendPlugin({ DefaultProgressComponent, DefaultNotFoundErrorPageComponent, DefaultErrorBoundaryComponent, + DefaultSignInPage, oauthRequestDialogAppRootElement, alertDisplayAppRootElement, ],