4️⃣Step 4 - Integrating Eartho into your server
1. Before we start, you need to import Eartho into your app.
2️⃣pageStep 2 - Import Eartho into your app2. Integrating Eartho into your backend environment with code
If you use Eartho One with an app or site that communicates with a backend server, you can protect your routes easily with our SDK as well.
After your users finish logging in with Eartho, they'll be returned to your application at the callback
route.
On the client side
Every request that your client makes to your server, send with the ID token on the client side
On the backend side
Check and verify the integrity of the ID token and use it to protect the API routes that you want to protect.
Step 1: Installing Required Packages
Step 2: Protecting Your Routes
Use the Eartho SDK to protect routes that require user authentication. For example, to protect a route that fetches user data, you would verify the user's ID token sent with the request.
If you don't have a backend environment, you can use no-code solution
If you don't have a backend, you can use Eartho in non-code environments as well.
The integration with Firebase empowers you to utilize Eartho to generate a valid authentication token to be sent to Firebase Auth. This integration allows you to harness Eartho's prebuilt components, authentication provider options, and additional functionalities, all while accessing Firebase products such as Firestore with a session authenticated by Firebase Auth.
1. Create a certificate file in Google
Generate a private key file in JSON format from Firebase accounts
Open this URL Service Accounts
Follow this video
2. Tell Eartho that you use Firebase Auth
Open our creators' dashboard https://creator.eartho.world/ 1. Pick the selected entity 2. Go to the security tab 3. Select Firebase environment 4. Upload the JSON file you created 5. Click Save and you're done 🎉
3. Authenticate with Firebase on Using a Custom
More Info Android
Last updated