Documentation Index
Fetch the complete documentation index at: https://docs.authsignal.com/llms.txt
Use this file to discover all available pages before exploring further.
Track Action
This method lets you track authentication actions performed by users and initiate challenges via the Authsignal pre-built UI, Web SDK or Mobile SDK.
const request = {
userId: "dc58c6dc-a1fd-4a4f-8e2f-846636dd4833",
action: "signIn",
attributes: {
redirectUrl: "https://yourapp.com/callback",
},
};
const response = await authsignal.track(request);
if (response.state === "CHALLENGE_REQUIRED") {
// Present challenge via Authsignal pre-built UI URL
const url = response.url;
} else if (response.state === "ALLOW") {
// Allow the user to sign in
} else if (response.state === "BLOCK") {
// Block the user from signing in
}
Learn more about how to track actions to implement MFA or passwordless login flows.
Get Action
This method lets you retrieve information about an action which was previously tracked.
const request = {
userId: "dc58c6dc-a1fd-4a4f-8e2f-846636dd4833",
action: "signIn",
idempotencyKey: "83d07321-9bba-4f08-a871-02e2af813b72",
};
const response = await authsignal.getAction(request);
Query Actions
This method lets you retrieve a list of actions for a user, with optional filters for action codes and date range.
const request = {
userId: "dc58c6dc-a1fd-4a4f-8e2f-846636dd4833",
// Optional filters
codes: "signIn,withdrawFunds", // Comma-separated list of action codes
fromDate: "2024-01-01T00:00:00Z", // ISO 8601 format
};
const actions = await authsignal.queryActions(request);
Update Action
This method lets you manually update the state of an action that was previously tracked.
const request = {
userId: "dc58c6dc-a1fd-4a4f-8e2f-846636dd4833",
action: "signIn",
idempotencyKey: "83d07321-9bba-4f08-a871-02e2af813b72",
attributes: {
state: "REVIEW_REQUIRED",
},
};
const updatedAttributes = await authsignal.updateAction(request);