Setting up Firebase
- First, in order to create authentication with Firebase you will need two things: first, a Firebase account and second, a Next.js project.
- Go to your console and create a new Firebase project.
- Once you have a project, proceed to the
Authenticationsection. - Click on the
Sign in methodtab and enable theEmail/passwordsign-in method and clicksave. - Go to
project settings, scroll and under your apps section click on theweb appusually displayed with a</>icon. - Register your app and click save.
- Install the npm package in your project:
Create a Firebase Config file
- Create a file named
firebase.tswith the following configuration:
- Update your environment variables:
.env.Setup the Chipi SDK Provider
Add Google's public keys endpoint to Chipi configuration🕺 !
Visit the dashboard JWKS and JWT configuration, select
Firebase as your auth provider, and paste this under the JWKS Endpoint URL.Follow the Firebase guides and begin your Journey !
Visit the Firebase Authentication guide to learn how to use
createUserWithEmailAndPassword and create your sign up and login!Using Firebase Auth with Chipi hooks 🕺 !
Below you will see a simple example of how you can get and pass your tokens to the different Chipi hooks:
