Welcome to AuthAlert, your trusted partner in authentication security. We specialize in providing cutting-edge solutions to safeguard your users' digital identities and protect their sensitive information. With AuthAlert, you can ensure that your users' online accounts are securely fortified against unauthorized access and potential breaches.
AuthAlert offers a comprehensive suite of features designed to enhance security and build trust:
This package is optimized for JavaScript frontends, including frameworks such as React, Vue.js, and Angular.
Installing AuthAlert is straightforward. Run the following command in your project directory:
npm install authalert
The AuthAlert API is flexible and can be utilized either as a Promise or within an asynchronous function.
Here's how to use the API within an asynchronous function:
import AuthAlertAPI from 'authalert';
const projectId = "your_project_ID";
const result = await AuthAlertAPI(projectId, {
user_id: user.id,
email: user.email,
first_name: user.first_name,
last_name: user.last_name
});
console.log(result);
Alternatively, you can use the API with Promises:
import AuthAlertAPI from 'authalert';
const projectId = "your_project_ID";
AuthAlertAPI(projectId, {
user_id: user.id,
email: user.email,
first_name: user.first_name,
last_name: user.last_name
})
.then(res => {
console.log(res);
})
.catch(err => {
console.error(err);
});
When using the API, you need to provide specific user data:
To obtain your project_ID, visit the AuthAlert website and create a project.
To securely use the AuthAlert API in your frontend applications, you must authorize your domains:
Upon a successful API call, AuthAlert evaluates whether the user is new to the system and if the device is new to the user. The response will be in the following format:
{
"new_user": false,
"new_device": true
}
If "new_device" is true, redirect users to the MFA route. This ensures that MFA is triggered only for new devices. Additionally, you can implement a "remember me" feature to allow users to bypass MFA on specific trusted devices.
Integrating Mailgun with AuthAlert enables you to send email alerts automatically when new devices are detected, without any additional coding. To set up Mailgun integration:
Webhook integration allows for programmatic interactions, enabling you to connect AuthAlert with CRM systems or other communication channels beyond Mailgun. To set up webhook integration:
When a new device is detected, AuthAlert sends a JSON payload to your specified webhook URL containing detailed information about the user and the device. Here is an example of the payload:
{
"user_id": "HZkj3L8we0gZjnHlrxziA53e1TH2",
"email": "",
"first_name": "",
"last_name": "",
"device_id": "6uex31zf1tx",
"subscription_id": "q9enh4fcvjmPDDVR1mNT",
"new_device": {
"device_id": "6uex31zf1tx",
"os": "Mac OS X",
"os_version": "10",
"browser": "Firefox",
"browser_version": "128",
"device_brand": "Apple",
"device_model": "Mac",
"device_family": "Mac",
"country": "AU",
"region": "NSW",
"city": "Sydney",
"city_lat_long": "-33.868820,151.209295",
"detection_time": 1615819845,
"timezone": "sydney/australia"
}
}
This payload provides comprehensive details about the user and the new device, allowing you to effectively automate and customize your security responses.
Learn more about how to boost your application security in software development