I am trying to add last_login and logins_count claims to idTokens for my application within a rule.
last_login is visible in the Identity Provider Attributes section on the “User Details” page and, according to documentation, should be accessible on the user object and its value should be the one associated with the login that triggered the rule (since rules execute after the actual login) (looking at User Profile Structure).
However, last_login does not exist on my user object or in the context object (as logins_count does).
Am I supposed to assume that last_login is the same as updated_at (and always will be)?
For reference, on my user, I have access to: [“_id”, “email”, “email_verified”, “user_id”, “clientID”, “picture”, “nickname”, “identities”, “updated_at”, “created_at”, “last_password_reset”, “name”, “global_client_id”, “persistent”]
And on my context, I have access to: [“tenant”, “clientID”, “clientName”, “clientMetadata”, “connection”, “connectionStrategy”, “connectionID”, “connectionOptions”, “connectionMetadata”, “samlConfiguration”, “jwtConfiguration”, “protocol”, “stats” (includes logins_count), “sso”, “accessToken”, “idToken”, “sessionID”, “request”].
Sorry for such huge delay in response! We’re doing our best in providing you with best developer support experience out there, but sometimes our bandwidth is not enough comparing to the number of incoming questions.
Wanted to reach out to know if you still require further assistance?