docs: update auth docs to mention and prefer single-provider SignInPage

This commit is contained in:
Patrik Oldsberg
2021-01-28 19:25:58 +01:00
parent 01058d486c
commit 23381386d6
2 changed files with 14 additions and 17 deletions
+2 -1
View File
@@ -86,7 +86,8 @@ to a `guest` identity for all users, without any ID token. To enable sign-in, a
`SignInPage` needs to be configured, which in turn has to supply a user to the
app. The `@backstage/core` package provides a basic sign-in page that allows
both the user and the app developer to choose between a couple of different
sign-in methods.
sign-in methods, or to designate a single provider that may also be logged in to
automatically.
## Further Reading
+12 -16
View File
@@ -349,22 +349,18 @@ const app = createApp({
apis,
plugins: Object.values(plugins),
components: {
SignInPage: props => {
return (
<SignInPage
{...props}
providers={[
{
id: 'github-auth-provider',
title: 'GitHub',
message: 'Simple Backstage Application Login',
apiRef: githubAuthApiRef,
},
]}
align="center"
/>
);
},
SignInPage: props => (
<SignInPage
{...props}
auto
provider={{
id: 'github-auth-provider',
title: 'GitHub',
message: 'Simple Backstage Application Login',
apiRef: githubAuthApiRef,
}}
/>
),
},
});
```