Problem/Motivation
Using phpmailer_oauth2, refresh token is never replaced after each call and we got this fatal after token expiration :
League\OAuth2\Client\Provider\Exception\IdentityProviderException: invalid_grant AADSTS700082: The refresh token has expired due to inactivity. The token was issued on 2023-06-13T08:09:44.4738924Z and was inactive for 90.00:00:00
We need then to do manualy the 'Get auth token' process every 90 days.
Proposed resolution
Refresh the store refresh token after each call.
Thanks
Issue fork phpmailer_oauth2-3386955
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
imclean commentedOne alternative is to use the PHPMailer SMTP module with PHPMailer library version 6.9.1 and Decomplexity's OAuth2 wrapper: https://github.com/decomplexity/SendOauth2
Comment #3
mugesh.s commentedUse the Refresh Token Validity Extension Module to prevent refresh token expiration.