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?

thanks

1 Like

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…

https://auth0.com/docs/rules/current/metadata-in-rules#updating-app_metadata

1 Like