https://www.ory.sh/ logo
#talk-kratos
Title
# talk-kratos
s

some-scooter-3723

01/27/2022, 8:33 AM
hello all, do we have any place to record "last login time" of user?
i

icy-manchester-83109

01/27/2022, 9:02 AM
There is not such thing implemented in kratos. When dealing with such requirements you should think about what last login means: 1. Is it the time, when the user lets kratos verify its credentials during the real login? 2. Is it the time kratos issues a session? This happens not only when the verification from 1 is successful, but also when kratos renews the session. Session renewal can be triggered by different things. If only 1 is interesting for you, you can get the information by making use of a web hook, which would contact your specific end point to record that event. IMHO you should better think about something like, "when did the user use my system being authenticated".
s

some-scooter-3723

01/27/2022, 2:17 PM
Point #1, @User. Which web hook I can setup, @User?
i

icy-manchester-83109

01/27/2022, 3:16 PM
5 Views