Trigger: A user login attempt that triggers an Auth0 Action in the Login / Post Login flow.
Context Pulled: The Action receives the full event object, including user metadata, IP geolocation, device fingerprint, and authentication method. It can also call an external API to fetch recent failed attempts or user role context.
AI Agent Action: The Action calls an inference endpoint with a prompt analyzing the login context against the user's historical baseline. The model returns a structured risk score and reasoning (e.g., { "risk_score": 85, "reason": "Impossible travel detected from previous login location", "suggested_action": "step_up_auth" }).
System Update: Based on the score, the Action can:
- Add a custom claim (
ai_risk_score) to the ID token for downstream applications.
- Dynamically require a step-up authentication factor via
event.riskAssessment.requiredStepUp = true.
- Trigger a webhook to your SIEM or SOAR platform to create a low-priority investigation ticket.
Human Review Point: Logs of all high-risk scores (e.g., >90) are streamed to a security dashboard for analyst review. The model's reasoning is included to accelerate investigation.