simple-jwt-authentication
simple-jwt-authentication copied to clipboard
Tokens updated on pwd update
Can you set it up so when a password is updated it automatically deletes all that users tokens?
I solved the problem adding the following to my functions.php:
add_action('after_password_reset', 'revoke_all_tokens', 10, 2);
function revoke_all_tokens($user, $password) {
delete_user_meta( $user->ID, 'jwt_data' );
return true;
}
Hi!
That's a good idea! I'll be sure to add it in when I find the time! I'll also accept a PR :)