Skip to content
Menu

Extensions

Your code, at the right moment.

Extensions are serverless Node.js functions that run right before a token is issued, or whenever one of 136 platform events happens. Add claims, change scopes, send one-time passwords through your own provider, or sync your stack.

event types to react to
136
event types to react to
serverless runtime
Node.js 24
serverless runtime
retries with back-off
5×
retries with back-off
The extensions of Example Corp in the Quasr Admin UI
The variables, attributes and code of an extension in the Quasr Admin UI
01

Shape your tokens

Run right before an access or ID token is issued: add custom claims, or set the scopes of an access token.

02

React to events

Trigger on API calls, authentication, data changes, registrations and more, filtered by type, origin, action, result and account.

03

Send OTPs your way

Deliver one-time passwords through your own email or SMS service, triggered by the send-otp event.

04

Keep data where it is

Fetch personal data from your own systems when a token is issued, instead of storing it in Quasr.

05

Isolated and encrypted

Each extension runs as its own isolated function. Variables are stored encrypted, and its logs become events you can inspect.

06

Built to be reliable

Failed runs are retried up to 5 times with exponential back-off: after 1, 2, 4, 8 and 16 seconds.

Specifications

runtime
Node.js 24, one CommonJS file, built-ins and fetch
per_tenant
5 extensions (10 on Enterprise)
timeout
5 seconds (up to 30 on Enterprise)
memory
128 MB, concurrency 25
events
delivered in real time, kept for at least 5 years
extension.js
/**
 * Add the customer tier from your own API to the access token.
 */
exports.handler = async function(event) {
    try {
        const response = await fetch(`https://api.example.com/customers/${event.account_id}`, {
            headers: { 'Authorization': `Bearer ${event.variables.api_key}` }
        });
        const customer = await response.json();
        return {
            scope: event.detail.scope,
            customer_tier: customer.tier
        };
    } catch (error) {
        console.error(error.message);
        return {
            scope: event.detail.scope
        };
    }
}

Ship login this afternoon.

Create a free account, configure your first tenant and connect your app with OpenID Connect.

No credit card required