Nothing Special   »   [go: up one dir, main page]

Skip to content

Discover how to easily implement Firebase Authentication with SvelteKit!

License

Notifications You must be signed in to change notification settings

eraygundogmus/sveltekit-firebase-auth-example

Repository files navigation

Init firebase

You need to install Firebase CLI to use Firebase Emulators. After installing Firebase CLI, you need to login to your Google account.

firebase login

Then, you need to initialize Firebase project in your project directory.

firebase init

You need to select Firebase Emulators in the list and hit enter. First list

Then, you need to select the firebase project you want to use in the list and hit enter.

Now you need to select which emulators you want to use. You need to select Authentication emulator and hit enter. First list

Environment variables

Create a file named .env in the root directory of the project. Then, add the variables below to the file or copy the content of .env.example file to .env file.

VITE_FIREBASE_API_KEY=API_KEY_HERE
VITE_FIREBASE_APP_ID=APP_ID_HERE
VITE_FIREBASE_USE_EMULATOR=true # true in development, false in production
VITE_FIREBASE_AUTH_DOMAIN=AUTH_DOMAIN_HERE

Run the Emulator

npm run firebase

or

firebase emulators:start

Run the project

npm run dev

or

yarn dev

Build the project

npm run build

or

yarn build

About

Discover how to easily implement Firebase Authentication with SvelteKit!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published