add support for the refresh_token flow + hook