Skip to content

Commit

Permalink
[cli] Add framework selection to support Vite (#4545)
Browse files Browse the repository at this point in the history
  • Loading branch information
bharatkashyap authored Jan 10, 2025
1 parent 26a9ee0 commit 33560f6
Show file tree
Hide file tree
Showing 38 changed files with 1,266 additions and 249 deletions.
23 changes: 22 additions & 1 deletion docs/data/toolpad/core/components/sign-in-page/sign-in-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,29 @@ If you're using the default [Next.js example](https://github.com/mui/toolpad/tre
If you're not on the Next Auth v5 version yet, see the [example with Next Auth v4](https://github.com/mui/toolpad/tree/master/examples/core/auth-nextjs-pages-nextauth-4/) to get started.
:::

### Firebase

#### Vite with React Router

##### Setting up

You need to create a `.env` file in the root of your project directory with the following environment variables:

```bash
VITE_FIREBASE_API_KEY=
VITE_FIREBASE_AUTH_DOMAIN=
VITE_FIREBASE_PROJECT_ID=
VITE_FIREBASE_STORAGE_BUCKET=
VITE_FIREBASE_MESSAGE_SENDER_ID=
VITE_FIREBASE_APP_ID=
```

:::info
If you're using Vite with React Router, check out the [example with Vite and React Router](https://github.com/mui/toolpad/tree/master/examples/core/auth-vite/) that showcases how to use `SignInPage` along with any external authentication library of your choice.
Head to the [Firebase docs](https://firebase.google.com/docs/auth/) for details around configuring authentication with Firebase. You can also find code examples in the [integration docs for Vite & React Router](https://mui.com/toolpad/core/integrations/react-router/).
:::

:::success
If you're using [create-toolpad-app](/toolpad/core/introduction/installation/), or the default [Vite with Firebase authentication example](https://github.com/mui/toolpad/tree/master/examples/core/firebase-vite/), the integration code is already provided.
:::

## Customization
Expand Down
Loading

0 comments on commit 33560f6

Please sign in to comment.