roundcube / roundcubemail

The Roundcube Webmail suite
https://roundcube.net
GNU General Public License v3.0
5.79k stars 1.62k forks source link

[oauth] add a "token_change" hook #8028

Closed downtownallday closed 3 years ago

downtownallday commented 3 years ago

This is an enhancement request.

It would be helpful to have a hook similar to the 'password_change' hook (password plugin), that would allow additional actions after a token refresh.

eg. add an exec_hook() call in program/include/rcmail_oauth.php refresh_access_token() after "auth succes".

thanks

alecpl commented 3 years ago

What use-case do you have in mind?

downtownallday commented 3 years ago

I was looking into what it would take to extend the Persistent Login plugin to support oauth and realized this would be required.

thomascube commented 3 years ago

Added hook oauth_refresh_token. See documentation here: https://github.com/roundcube/roundcubemail/wiki/Plugin-Hooks#oauth_refresh_token