Webhook Configuration Guide

Set up and manage webhooks for real-time authentication events and notifications

Webhook Event Flow

Set up webhooks to receive real-time notifications for authentication events.

Available Events

  • user.created
  • user.login
  • user.logout
  • user.password_reset
  • security.alert

Webhook Configuration

{
  "url": "https://your-api.com/webhooks",
  "events": ["user.login", "user.logout"],
  "secret": "your-webhook-secret",
  "headers": {
    "X-Custom-Header": "value"
  }
}

Payload Structure

{
  "event": "user.login",
  "timestamp": "2024-02-05T10:00:00Z",
  "data": {
    "user_id": "usr_123",
    "ip_address": "192.168.1.1",
    "user_agent": "Mozilla/5.0..."
  }
}

Security

Verify webhook signatures:

const signature = req.headers['x-webhook-signature'];
const payload = req.rawBody;

const isValid = verifySignature(payload, signature, secret);

For retry policies and error handling, see our integration guide.

Written by