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

Command icon 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

    muzopipigo created an issue. See original summary.

    imclean’s picture

    One 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

    mugesh.s’s picture

    Status: Active » Needs review

    Use the Refresh Token Validity Extension Module to prevent refresh token expiration.

    https://www.drupal.org/project/refresh_token_validity_extension