Show rule error in Universal Login

Hi @FDX,

I dug in on this one, and the answer is a no, you cannot return an error from a rule in the login form. This is because the rule happens after authentication and the redirect. Essentially, you are already redirected by the time the rule runs. I had a suspicion of this, but that doc you listed is fairly confusing. I think the particularly confusing part is in regards to this line:

“If you are returning custom error codes from a rule or a custom database script, you can also add the error messages in the dictionary:”

I think this is true for custom DB scripts, but not a rule. I am going to confirm with the team and try and clarify. I will report back with any relevant info.

With that being said, the best route will be to use a custom page to display the error returned from the rule.

Thanks for working through this.

Best,
Dan

1 Like