Tmeister / wp-api-jwt-auth

A simple plugin to add JSON Web Token (JWT) Authentication to WP REST API
GNU General Public License v2.0
551 stars 159 forks source link

Update user last_login_time when generating a token #158

Closed nreynis closed 5 years ago

nreynis commented 5 years ago

When requesting a token the user submit an username and a password this is a login action. You should refresh this user's last_login_time.

Not only does it make sense from the functionnal perspective but it's also required for compatibility with security plugins who enforce user relogin after a set amont of time (ex: https://fr.wordpress.org/plugins/all-in-one-wp-security-and-firewall/)

nreynis commented 5 years ago

I realised that last_login_time was a meta added by the security plugin. It's not part of wordpress core. Therefore there is no issue with your code, it's an integration problem.

I close the issue.