Keymate Logo

Know When Users Last Logged In—Securely and Reliably

This Keymate extension captures and stores the timestamp of every successful login—enabling audit compliance, inactivity tracking, and personalized user experiences.

Track, Display, and React to User Login Timestamps

Visibility into User Activity—at a Glance

With this extension, Keycloak can:

Login Timestamp Flow

All with minimal performance overhead and full Keycloak compatibility.

Example: Capture, store, and utilize user login timestamps for enhanced security and personalization.

Key Components:

Log last successful login timestamp per user
Store it as a user attribute or external audit record
Use it in policies (e.g. for dormant account detection)
Show it on the account dashboard or admin UI
Trigger downstream actions (e.g. notify admin after X days of inactivity)

Extension Highlights

Timestamp Logging

Records lastLoginAt on every successful login

Flexible Storage

Write to Keycloak user attributes or external DB/audit system

Policy-Aware Usage

Make authorization or token enrichment decisions based on login recency

UI Display Ready

Expose last login to the user on account pages

Inactivity Tracking

Detect stale accounts or long gaps in access

Zero Template Modification

Fully SPI-based—no FreeMarker or UI hacking needed

Frequently Asked Questions

No. It's a lightweight listener that adds negligible latency.
When stored externally (e.g. audit DB), it's immutable and traceable.
Yes. Pair with policy engine or admin scripts to disable accounts after N days.
Yes. It works on a per-realm basis, and can segment audit logs by tenant.

How to Use This Extension

Keep track of user activity—and act on it. Activate Keymate's Last Login Listener to gain full visibility into user engagement.

Implementation Steps

1

Deploy the event listener SPI into your Keycloak instance

2

Configure the listener to store timestamps (Keycloak user attribute or external audit store)

3

Optionally expose lastLoginAt in your UI or API

4

Use it in policies, analytics, or user notifications

5

Monitor login patterns and audit logs for insights

ELEVATE YOUR IAM STRATEGY

Ready to Transform Your Keycloak Experience?

Implement fine-grained authorization, multi-tenant infrastructure, and comprehensive security policies with Keymate — built on the Keycloak foundation you already trust.