Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions workspaces/lightspeed/app-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,17 @@ techdocs:

auth:
# see https://backstage.io/docs/auth/ to learn about auth providers
environment: development
providers:
# See https://backstage.io/docs/auth/guest/provider
guest: {}
# github:
# development:
# clientId: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# clientSecret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# signIn:
# resolvers:
# - resolver: usernameMatchingUserEntityName

scaffolder: {}
# see https://backstage.io/docs/features/software-templates/configuration for software template options
Expand Down
11 changes: 10 additions & 1 deletion workspaces/lightspeed/packages/app/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,14 @@ import { RequirePermission } from '@backstage/plugin-permission-react';
import { catalogEntityCreatePermission } from '@backstage/plugin-catalog-common/alpha';
import { lightspeedTranslations } from '@red-hat-developer-hub/backstage-plugin-lightspeed/alpha';
import { LightspeedPage } from '@red-hat-developer-hub/backstage-plugin-lightspeed';
import { githubAuthApiRef } from '@backstage/core-plugin-api';

const githubProvider = {
id: 'github-auth-provider',
title: 'GitHub',
message: 'Sign in using GitHub',
apiRef: githubAuthApiRef,
};
const app = createApp({
apis,
__experimentalTranslations: {
Expand All @@ -78,7 +85,9 @@ const app = createApp({
});
},
components: {
SignInPage: props => <SignInPage {...props} auto providers={['guest']} />,
SignInPage: props => (
<SignInPage {...props} auto providers={['guest', githubProvider]} />
),
},
});

Expand Down
3 changes: 3 additions & 0 deletions workspaces/lightspeed/packages/backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,7 @@ backend.add(
import('@red-hat-developer-hub/backstage-plugin-lightspeed-backend'),
);

// GitHub auth
backend.add(import('@backstage/plugin-auth-backend-module-github-provider'));

backend.start();