Skip to main content

Back-end Setup

In case you use a language other than Node.js or you prefer to integrate with Bawabah API manually, please refer to our API Reference.

Install Bawanah Library

First, we have to install Bawabah Library from NPM (https://www.npmjs.com/package/bawabah) using the command:
After installing the npm Package, we can start using it immediately:
Replace {your-app-id} with your appId and {your-app-secret}with your appSecret From Create Your First App Step.

Create Callback Route

Now we will create the callback route to capture the user session. In this example, we will use Express.js to create the route, then capture the user session with the capture() function: But before that, we need to install Express.js using this command:
Finally, after testing the implementation, we can add our Login/Signup logic and wrap the code in a try/catch block to catch any errors:
Need help? Join our community.

Choose your preferred framework:

Next.js

Vue

Astro

Cloudflare Workers