0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-16 19:38:07 +00:00
router/examples/solid/authenticated-routes-firebase
History 2026-03-04 20:37:33 +00:00
..
.vscode docs(solid-router): authenticated-routes-firebase (#5826) 2025-11-12 01:21:22 +01:00
src chore: add source() to Tailwind v4 imports to ensure consistent hashing (#6459) 2026-01-24 01:49:12 +01:00
.env.example docs(solid-router): authenticated-routes-firebase (#5826) 2025-11-12 01:21:22 +01:00
.gitignore docs(solid-router): authenticated-routes-firebase (#5826) 2025-11-12 01:21:22 +01:00
index.html docs(solid-router): authenticated-routes-firebase (#5826) 2025-11-12 01:21:22 +01:00
package.json release: v1.166.2 2026-03-04 20:37:33 +00:00
README.md docs(solid-router): authenticated-routes-firebase (#5826) 2025-11-12 01:21:22 +01:00
tsconfig.json docs(solid-router): authenticated-routes-firebase (#5826) 2025-11-12 01:21:22 +01:00
vite.config.js docs: move to tailwind 4 w/ vite (#6168) 2025-12-21 04:13:49 +01:00

Firebase Setup

  1. Create a Firebase project

    1. By default, firebase will configure an accepted domain for localhost...update if necessary!
  2. Enable Authentication in the Firebase console

  3. Add GitHub as an authentication provider:

    • Go to Authentication > Sign-in method > GitHub
    • Enable GitHub authentication
    • You'll need to set up OAuth in your GitHub account:
      • Go to GitHub Developer Settings
      • Create a new OAuth app
      • Set the homepage URL to your local or production URL
      • Set the callback URL to: https://your-firebase-project-id.firebaseapp.com/__/auth/handler
      • Copy the Client ID and Client Secret
    • Return to Firebase console and paste the GitHub Client ID and Client Secret
    • Save the changes
  4. Create a web app in your Firebase project:

    • Go to Project Overview > Add app > Web
    • Register the app with a nickname
    • Copy the Firebase configuration object for later use

Setup .env.local

Copy the .env.example provided and configure with your firebase credentials

VITE_FIREBASE_AUTH_DOMAIN=
VITE_FIREBASE_PROJECT_ID=
VITE_FIREBASE_STORAGE_BUCKET=
VITE_FIREBASE_MESSAGING_SENDER_ID=
VITE_FIREBASE_APP_ID=```

## Run the app

To run this example:

- `npm install` or `yarn`
- `npm start` or `yarn start`