This Go REST API shows how to authenticate users using the Firebase SDK while using Ding as an OTP provider.
To get started, you need to setup a Firebase project in the Firebase console. Learn more here.
You need the following envs to connect to your Firebase project and the Ding API.
SA_FILE_PATH
: A path to your service account JSON fileDING_API_KEY
: Your Ding API keyDING_CUSTOMER_UUID
: Your Ding customer UUID
The API exposes two routes:
send_code
: triggers an authentication message deliveryverify
: allows the frontend to send the entered code for verification and returns a Firebase JWT token