Skip to main content

What are user actions?

Actions represent security-relevant events in your application and serve as the foundation for implementing:
  • Multi-factor authentication (MFA) - Challenge users after primary authentication
  • Step-up authentication - Require additional verification for sensitive operations
  • Adaptive authentication - Apply rules based on risk factors and context
  • Passwordless authentication - Use Authsignal as the primary authentication method
Every action has an associated state that determines how your application should respond to the user’s request.

Action operations

Track action

The primary method for recording user activities and initiating authentication challenges. This is the core operation you’ll use throughout your application.
When you track an action, you provide:
  • User ID - Unique identifier for the user
  • Action code - What the user is doing (e.g., “signIn”, “withdrawFunds”)
  • Attributes - Contextual information for risk assessment

Get action

Retrieve detailed information about a previously tracked action using its unique identifiers.

Query actions

Retrieve a list of actions for a specific user to view their authentication history.

Update action

Manually modify the state of a previously tracked action. This is useful for administrative actions or custom workflows.

Action states

Every action results in one of these states that determine how your application should respond:

State transitions

Actions can transition between states based on user interactions and administrative actions:

Action attributes

When tracking actions, you can provide contextual information that helps with risk assessment and rule evaluation:

Standard attributes

Custom attributes

Use the custom field to pass business-specific data for use in rules:
This custom data can then be used in Authsignal rules to make intelligent authentication decisions.

Action lifecycle

Understanding the complete action lifecycle helps you implement robust authentication flows:

1. Action creation

Actions are created when you call track(). Each action gets:
  • Unique identifiers (userId, action, idempotencyKey)
  • Initial state based on rules evaluation
  • Contextual metadata (IP, user agent, custom data)

2. Rule evaluation

When an action is tracked, Authsignal’s rules engine evaluates:
  • User enrollment status
  • Configured rules and conditions
  • Risk factors and context
  • Custom business logic

3. Challenge flow (if required)

For CHALLENGE_REQUIRED actions:
  • Generate short-lived token or URL
  • User completes authentication via pre-built UI or Client SDKs
  • Action state updates to CHALLENGE_SUCCEEDED or CHALLENGE_FAILED

4. Validation

Your application validates the challenge result and proceeds based on the final state.

Integration patterns

Just-in-time authentication

Track actions at the point where authentication is needed:

Pre-authentication

Track actions before performing operations to determine if additional security is needed:

Idempotency

Actions are automatically deduplicated using idempotency keys. Multiple calls with the same user ID, action, and idempotency key will return the same result.

Next steps