Auth0 Home Blog Docs

How to get last login ip in a rule or hook (not current login info)?



I am trying to do something in a rule after a used has logged in based on the last time they logged in prior to the current login. Is there a way to do this with the existing rule/hook stuff?



Answering my own question. It looks like you have access to an auth0 object in the rule that already has needed access to updating metadata, so you could store the ip in it during the rule, and then check it at the beginning of the rule for the last login ip…