1
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:
2
Create a Firebase Config file
- Create a file named
firebase.tswith the following configuration:
- Update your environment variables:
.env.3
Install the Chipi SDK
Install the required packages:
4
Setup the Chipi SDK Provider
5
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.6
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!7
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:
8
Celebrate & Learn More! 🎉
That’s it! You should now have an initial working version of Chipi Pay integrated into your application. You can now start implementing various features like:
- Wallet Creations
- Sending tokens
- Signing transactions
- and more!
