Skip to content

cookiehankie/auth

Repository files navigation

Firebase Authentication

The Firebase Auth quickstart demonstrates several methods for signing in:

  • The Firebase phone number authentication demonstrates using Firebase phone number authentication with a visible ReCaptcha.
  • The Firebase Google Sign in demonstrate using a Google account to authenticate to Firebase with a popup page.

Introduction

Read more about Firebase Auth

Workflow

Identity Provider Authentication

google-auth

Getting Started

  1. Create a Firebase project on the Firebase Console.

    [Firebase Console > Project Settings > General > Web app > SDK setup and configuration]

    Copy the Firebase config object and paste it in the firebase/config.js file to replace the template.

  2. You must have the Firebase CLI installed.

    If you don't have it, install it with npm install -g firebase-tools and then configure it with firebase login.

  3. On the command line, cd into the repo.

  4. Run firebase use --add and select your Firebase project.

To run the sample app locally during development:

  1. Run npm install to install dependencies.
  2. Run firebase emulators:start to start the local Firebase emulators. Note: phone authentication required ReCaptcha verification which does not work with the Firebase emulators. These examples skip connecting to the emulators.
  3. Run npm run dev to serve the app locally using Vite This will start a server locally that serves index.html on http://localhost:5174/index.html.

Running the app using the Firebase CLI:

  1. Run npm install to install dependencies.
  2. Run npm run build to build the app using Vite.
  3. Run firebase emulators:start to start the local Firebase emulators. Note: phone authentication required ReCaptcha verification which does not work with the Firebase emulators. These examples skip connecting to the emulators.
  4. In your terminal output, you will see the "Hosting" URL. By default, it will be 127.0.0.1:5002, though it may be different for you.
  5. Navigate in your browser to the URL output by the firebase emulators:start command.

Support

https://firebase.google.com/support/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published