You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to get PHPMailer to authenticate with SMTP AUTH using Oauth2.
I am using the thephpleague’s OAuth2 and thenetworg’s Azure provider via MSFT’s V2 authorisation and token endpoints (the StevenMaguire provider previously used for Live Mail and so on is out of date).
My MSFT tenant has SMTP AUTH enabled (MSFT is disabling it on new tenants).
My Composer JSON requires the following versions: phpmailer/phpmailer": "~6.1" and "thenetworg/oauth2-azure": "1.4.2"
I am running PHP 5.6.
So…
get_auth_token works fine and the ‘code=’ refresh token that is part of the returned URL is cut and pasted to my authorization code module (the code with ‘new Azure()’ and ‘new Provider()’).
But invoking my base module gives Fatal error: Uncaught exception 'League\OAuth2\Client\Provider\Exception\IdentityProviderException' with message 'invalid_grant AADSTS9002313: Invalid request. Request is malformed or invalid.
Trace ID: 96c59fae-0904-4a68-910f-dd1628404000 Correlation ID: 147e4826-54eb-43d0-97d3-7c12fb4e7435 Timestamp: 2020-07-26 18:25:38Z'.
Checking in AbstractProvider.php’s getAccessToken method, the $params array parameters (client_id, client_secret and redirect_uri) and the $options parameter (refresh_token) all have the values assigned in my authorization code module so nothing appears to have got lost on the way.
The refresh token is 750 characters:
a single-character prefix (0)
a dot
a 51 character payload
a dot
a 696 character ‘signature area’
Whether these are sensible I know not, since the content of refresh tokens is (by design) known only to the issuer.
Any suggestions appreciated on how to proceed.
[Since the error is flagged from a thephpleague module but the provider is thenetworg’s Azure, I am posting here with a shadow post for the thenetworg’s Azure]
The text was updated successfully, but these errors were encountered:
I am trying to get PHPMailer to authenticate with SMTP AUTH using Oauth2.
I am using the thephpleague’s OAuth2 and thenetworg’s Azure provider via MSFT’s V2 authorisation and token endpoints (the StevenMaguire provider previously used for Live Mail and so on is out of date).
My MSFT tenant has SMTP AUTH enabled (MSFT is disabling it on new tenants).
My Composer JSON requires the following versions: phpmailer/phpmailer": "~6.1" and "thenetworg/oauth2-azure": "1.4.2"
I am running PHP 5.6.
So…
get_auth_token works fine and the ‘code=’ refresh token that is part of the returned URL is cut and pasted to my authorization code module (the code with ‘new Azure()’ and ‘new Provider()’).
But invoking my base module gives Fatal error: Uncaught exception 'League\OAuth2\Client\Provider\Exception\IdentityProviderException' with message 'invalid_grant AADSTS9002313: Invalid request. Request is malformed or invalid.
Trace ID: 96c59fae-0904-4a68-910f-dd1628404000 Correlation ID: 147e4826-54eb-43d0-97d3-7c12fb4e7435 Timestamp: 2020-07-26 18:25:38Z'.
Checking in AbstractProvider.php’s getAccessToken method, the $params array parameters (client_id, client_secret and redirect_uri) and the $options parameter (refresh_token) all have the values assigned in my authorization code module so nothing appears to have got lost on the way.
The refresh token is 750 characters:
Whether these are sensible I know not, since the content of refresh tokens is (by design) known only to the issuer.
Any suggestions appreciated on how to proceed.
[Since the error is flagged from a thephpleague module but the provider is thenetworg’s Azure, I am posting here with a shadow post for the thenetworg’s Azure]
The text was updated successfully, but these errors were encountered: