Hi,
I am implementing a system with several applications attached to one tenant.
I have SSO, Universal Login and all applications with working authorization and authentication using Auth0.
What I want to do is to implement lastLoggedIn date for all applications separately.
For example: ApplicationA, ApplicationB and ApplicationC is given. I want to use the same SSO for all of these apps with same credentials, and I want to store lastLoggedIn date for each apps (for example: 11/11/2022 (for app A) 13/11/2022 (for app B) and 9/9/2022 (for app C)).
I understand that last_login field point date of last logging to Auth0 - such as Universal Login and it is shared across applications.
Is there any possibility to obtain that data from Auth0 user, either from API or callback redirect?
Can it be done by checking what app want to authorize in Auth0 or it have to be done separately from Auth0?
Unfortunately, it is not possible to get a user’s last login date for separate applications.
As a workaround, I recommend creating a Post Login Action script where you save the last_login property based on the application they are logging into in the user_metadata.
To do so, you will need to call the Management API in Actions to get the last_login property and then call the api.user.setUserMetadata method to save this value.