# Add last logout date/time to JWT claims

**URL:** <https://community.auth0.com/t/add-last-logout-date-time-to-jwt-claims/98850>\
**Category:** Get Help\
**Tags:** security-compliance, security-question-concern, sessions, logout\
**Created:** [January 24, 2023, 7:15pm UTC](https://community.auth0.com/t/add-last-logout-date-time-to-jwt-claims/98850 "2023-01-24T19:15:36Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [January 24, 2023, 8:49pm UTC](https://community.auth0.com/t/add-last-logout-date-time-to-jwt-claims/98850/3 "2023-01-24T20:49:52Z")

</div>

Hi @josh.young,

Welcome to the Auth0 Community!

> [@josh.young](#):
>
> Is there a way to attach actions to logout?
> 
> I’d like to save the last logout date as a JWT claim to allow invalidation of the JWT immediately (or soon thereafter) on logout. This is to address the security concern around [session expiration](https://cheatsheetseries.owasp.org/cheatsheets/Session_Management_Cheat_Sheet.html#session-expiration).

Unfortunately, we currently do not support a Post-Logout Action and there isn’t a `last_logout` user profile attribute. With that said, I believe this would be a great candidate for a feedback request. If you have a moment, I recommend [creating a feedback request](https://community.auth0.com/c/feedback/95) asking to support a Post Logout Action.

Now, it may be possible to leverage your Auth0 Logs to find the [`slo`](https://auth0.com/docs/deploy-monitor/logs/log-event-type-codes#slo:~:text=a%20Refresh%20Token-,slo,-Success%20Logout) Log Event to determine if the access token is valid when compared to the logout time. However, there isn’t an easy way to accomplish this without some heavy lifting on your end.

With that said, my best recommendation is to make the access token expiration as short-lived as possible.

Please check out this related [Community Post](https://community.auth0.com/t/invalidating-an-access-token-when-user-logs-out/48365/2?) regarding invalidating access tokens when a user logs out.

Let me know if I can help you with anything else.

Thanks,  
Rueben

---

_[View the full topic](https://community.auth0.com/t/add-last-logout-date-time-to-jwt-claims/98850)._
