Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Sign-in page grammar #3977

Merged
merged 2 commits into from
Aug 22, 2024
Merged
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
14 changes: 7 additions & 7 deletions docs/data/toolpad/core/components/sign-in-page/sign-in-page.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
productId: toolpad-core
title: Sign In Page
title: Sign-in Page
components: SignInPage, Account, NotificationsProvider
---

# Sign In Page
# Sign-in Page

<p class="description">A customizable sign in UI component that abstracts away the pain needed to wire together a secure authentication page for your application.</p>
<p class="description">A customizable sign-in UI component that abstracts away the pain needed to wire together a secure authentication page for your application.</p>

The `SignInPage` component is a quick way to generate a ready-to-use authentication page with multiple OAuth providers, or a credentials form.

Expand Down Expand Up @@ -49,7 +49,7 @@ This renders an alert with the `error` string as the message.

The component is composable with any authentication library you might want to use. The following is a `SignInPage` with [Auth.js](https://authjs.dev/) using GitHub, Next.js App router and server actions.

{{"component": "modules/components/DocsImage.tsx", "src": "/static/toolpad/docs/core/auth-next.png", "alt": "Auth.js & Next.js with Toolpad Core sign in page", "caption": "Auth.js & Next.js app router with Toolpad Core Sign In page", "zoom": true, "indent": 1 }}
{{"component": "modules/components/DocsImage.tsx", "src": "/static/toolpad/docs/core/auth-next.png", "alt": "Auth.js & Next.js with Toolpad Core sign-in page", "caption": "Auth.js & Next.js app router with Toolpad Core Sign-in page", "zoom": true, "indent": 1 }}

#### Setting up

Expand All @@ -61,7 +61,7 @@ To get the required credentials, create an application in the GitHub developer s

##### Server Configuration

The `SignInPage` component can slot in as a custom sign in page inside Auth.js:
The `SignInPage` component can slot in as a custom sign-in page inside Auth.js:

```ts title="./auth.ts"
// ...
Expand All @@ -74,7 +74,7 @@ export const { handlers, auth, signIn, signOut } = NextAuth({
// ...
```

You can then have a fully built GitHub sign in page appear at `/auth/signin` by adding `SignInPage` to `page.tsx`:
You can then have a fully built GitHub sign-in page appear at `/auth/signin` by adding `SignInPage` to `page.tsx`:

```tsx title="./app/auth/signin/page.tsx"
// ...
Expand Down Expand Up @@ -127,7 +127,7 @@ export default function SignIn() {
```

:::info
If you're using the default [Next.js app directory example](https://github.com/mui/mui-toolpad/tree/master/examples/core-auth-nextjs/), all of this is already configured for you. Otherwise, follow the [custom sign in page instructions](https://authjs.dev/guides/pages/signin).
If you're using the default [Next.js app directory example](https://github.com/mui/mui-toolpad/tree/master/examples/core-auth-nextjs/), all of this is already configured for you. Otherwise, follow the [custom sign-in page instructions](https://authjs.dev/guides/pages/signin).
:::

## Customization
Expand Down
2 changes: 1 addition & 1 deletion docs/data/toolpad/core/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ const pages: MuiPage[] = [
},
{
pathname: '/toolpad/core/react-sign-in-page',
title: 'Sign In Page',
title: 'Sign-in Page',
},
{
pathname: '/toolpad/core/react-account',
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/toolpad/core/api/account.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
"muiName": "Account",
"filename": "/packages/toolpad-core/src/Account/Account.tsx",
"inheritance": null,
"demos": "<ul><li><a href=\"/toolpad/core/react-account/\">Account</a></li>\n<li><a href=\"/toolpad/core/react-dashboard-layout/\">Dashboard Layout</a></li>\n<li><a href=\"/toolpad/core/react-sign-in-page/\">Sign In Page</a></li></ul>",
"demos": "<ul><li><a href=\"/toolpad/core/react-account/\">Account</a></li>\n<li><a href=\"/toolpad/core/react-dashboard-layout/\">Dashboard Layout</a></li>\n<li><a href=\"/toolpad/core/react-sign-in-page/\">Sign-in Page</a></li></ul>",
"cssComponent": false
}
2 changes: 1 addition & 1 deletion docs/pages/toolpad/core/api/notifications-provider.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
"muiName": "NotificationsProvider",
"filename": "/packages/toolpad-core/src/useNotifications/NotificationsProvider.tsx",
"inheritance": null,
"demos": "<ul><li><a href=\"/toolpad/core/react-sign-in-page/\">Sign In Page</a></li>\n<li><a href=\"/toolpad/core/react-use-notifications/\">useNotifications</a></li></ul>",
"demos": "<ul><li><a href=\"/toolpad/core/react-sign-in-page/\">Sign-in Page</a></li>\n<li><a href=\"/toolpad/core/react-use-notifications/\">useNotifications</a></li></ul>",
"cssComponent": false
}
2 changes: 1 addition & 1 deletion docs/pages/toolpad/core/api/sign-in-page.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@
"muiName": "SignInPage",
"filename": "/packages/toolpad-core/src/SignInPage/SignInPage.tsx",
"inheritance": null,
"demos": "<ul><li><a href=\"/toolpad/core/react-sign-in-page/\">Sign In Page</a></li></ul>",
"demos": "<ul><li><a href=\"/toolpad/core/react-sign-in-page/\">Sign-in Page</a></li></ul>",
"cssComponent": false
}
2 changes: 1 addition & 1 deletion packages/toolpad-core/src/Account/Account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export interface AccountProps {
*
* - [Account](https://mui.com/toolpad/core/react-account/)
* - [Dashboard Layout](https://mui.com/toolpad/core/react-dashboard-layout/)
* - [Sign In Page](https://mui.com/toolpad/core/react-sign-in-page/)
* - [Sign-in Page](https://mui.com/toolpad/core/react-sign-in-page/)
*
* API:
*
Expand Down
2 changes: 1 addition & 1 deletion packages/toolpad-core/src/SignInPage/SignInPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export interface SignInPageProps {
*
* Demos:
*
* - [Sign In Page](https://mui.com/toolpad/core/react-sign-in-page/)
* - [Sign-in Page](https://mui.com/toolpad/core/react-sign-in-page/)
*
* API:
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ let nextId = 1;
*
* Demos:
*
* - [Sign In Page](https://mui.com/toolpad/core/react-sign-in-page/)
* - [Sign-in Page](https://mui.com/toolpad/core/react-sign-in-page/)
* - [useNotifications](https://mui.com/toolpad/core/react-use-notifications/)
*
* API:
Expand Down
Loading