app-next: switch to existing sign-in page

Co-authored-by: Camila Belo <camilaibs@gmail.com>
Co-authored-by: Vincenzo Scamporlino <vincenzos@spotify.com>
Co-authored-by: Philipp Hugenroth <philipph@spotify.com>
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-11-15 15:26:48 +01:00
parent 640f05f485
commit 1c956bcdc8
+2 -27
View File
@@ -46,8 +46,8 @@ import {
ScmIntegrationsApi,
scmIntegrationsApiRef,
} from '@backstage/integration-react';
import Button from '@material-ui/core/Button';
import { createSignInPageExtension } from '@backstage/frontend-plugin-api';
import { SignInPage } from '@backstage/core-components';
/*
@@ -93,32 +93,7 @@ const homePageExtension = createExtension({
const signInPage = createSignInPageExtension({
id: 'signInPage',
loader: async () => (props: SignInPageProps) =>
(
<div>
<h1>Sign in page</h1>
<div>
<Button
onClick={() =>
props.onSignInSuccess({
getProfileInfo: async () => ({
email: 'guest@example.com',
displayName: 'Guest',
}),
getBackstageIdentity: async () => ({
type: 'user',
userEntityRef: 'user:default/guest',
ownershipEntityRefs: ['user:default/guest'],
}),
getCredentials: async () => ({}),
signOut: async () => {},
})
}
>
Sign in
</Button>
</div>
</div>
),
<SignInPage {...props} providers={['guest']} />,
});
const scmAuthExtension = createApiExtension({