How can I track failed login attempts (is there a variable exposed)?

I need to implement a Corporate login rule to lock an account based on the number of failed successive login attempts. I assume I will need a custom rule for this, but is there a variable available that would track this number?

Hi @phil.fitzgerald thanks for your question!

I might need to hear a bit more context surrounding how you’d like to block an account. If it’s just by consecutive failed login attempts have you considered our built in Brute-Force Protection? Here’s a bit more information on the topic as well.

In terms of variables you’d have access to within a rule, you should have access to the logins under ‘context.stats.loginsCount’ though I’d recommend utilizing some console.logs while building out your rule to confirm.

Best Regards,
Colin

Hi,

I’m looking for the same information and I have to say this is absurd. context.stats.loginsCount seems to be referring to “login attempts”, without indication if it’s a “fail” or “success”? How do you know a login attempt is failed via that single variable or am I missing something?!

I’ve been digging through the documentation and cannot find anything that will help me (useless documentation not explaining in details what are the variables / properties on Context Object Properties in Rules) for example.