Title: Authentication Issue
Last modified: July 15, 2020

---

# Authentication Issue

 *  Resolved [webauthor](https://wordpress.org/support/users/webauthor/)
 * (@webauthor)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/authentication-issue-6/)
 * Hi,
 * I have 3 separate self hosted WordPress installations all using the somme domain(
   domain.com, intranet.domain.com and test.domain.com).
 * All 3 sites are using the same email address (notifications@domain.com using 
   G Suite). I can get your plugin to work on 2 of the sites, but not on the 3rd.
 * The first two sites are on an Ubuntu 16.04 machine running php 7.0. The one I’m
   having an issue with is running Ubuntu 20.04 and php PHP 7.4.3 (cli) (built: 
   May 26 2020 12:24:22
 * I can’t imaging that it’s this version of php but I need to ask. Is your current
   plugin compatible with php 7.4.3?
 * All 3 sites are on two VM Instances hosted by GCP. The two working are on the
   same VM Instance and the 3rd giving me problems is on a separate VM Instance 
   running the latest version of Ubuntu and php.
 * I’ve deleted the OAuth App then recreated, I’ve removed all credentials then 
   re-created them. I’ve fully deleted your plugin and data 5 times so as to start
   from scratch. I’m not using any caching plugins and have disabled all other plugins
   but still getting this message after authenticating with the correct email account:
 * **There was an error while processing the authentication request. Please try 
   again.**
 * I’ve setup your plugin on hundreds of sites. This is the first time we’re using
   the same email address for more than two sites. Do you know if there is a limit
   on the the number of times you can authorize an app using the same app and but
   different credentials using the same email address?
 * Any ideas?
 * Lastly, is it necessary to fully delete the plugin and data when changing the
   Client Keys? If so, you may want to consider offering a way to flush the data
   from the plugin instead of having to delete then re-install.
    -  This topic was modified 5 years, 11 months ago by [webauthor](https://wordpress.org/support/users/webauthor/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [webauthor](https://wordpress.org/support/users/webauthor/)
 * (@webauthor)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/authentication-issue-6/#post-13126516)
 * Update:
 * I tried using the Post STMP Plugin on the 3rd site using the same credentials
   and it worked. That tells me it’s not a Google API issue. So I’m thinking that
   your plugin must not be using newly saved credentials even after electing to 
   delete data after deleting the plugin. As a test, I removed the Post SMTP plugin
   then tried to re-installed WP Mail SMTP and had the same authentication problem.
   Once more, I deleted your plugin, reinstalled the Post SMTP plugin using the 
   same credentials and it works. I prefer using your plugin so if you have any 
   ideas, let me know.
 * Also, I’ve never seen an answer to these questions so perhaps you can answer 
   them…
 * The email address we that shows up by default in your plugin when going to your
   Plugin Settings for the first time, it displays the email address used in WordPress/
   Settings (site admin email address).
 * 1) Is it possible to use another Gmail or G Suite email address other that what’s
   used in WordPress Settings?
 * 2) If yes, does that email address need to be a user within that WordPress install?
 * 3) If yes, does that other email address you want to use need to have Administrative
   Privileges?
 * 4) If the password for the email address you use changes, does stop your plugin
   from working? If yes, do you simply need to re-Authorize within your plugin?
 * 5) Why does your plugin prevent us from changing the From email address after
   saving and authorizing?
 *  Plugin Author [Gregor Capuder](https://wordpress.org/support/users/capuderg/)
 * (@capuderg)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/authentication-issue-6/#post-13126882)
 * Hi [@webauthor](https://wordpress.org/support/users/webauthor/),
 * The highest PHP version I tested with was 7.4.7:
    Server architecture. Linux 
   4.19.76-linuxkit x86_64 Web server Apache/2.4.38 (Debian) PHP version 7.4.7 (
   Supports 64bit values)
 * And the Gmail connection was successful.
 * The error that you got:
 * > There was an error while processing the authentication request. Please try 
   again.
 * Was it exactly like this or did it have an additional error description next 
   to it?
 * If it’s without additional error description, it means that the authorization
   code or the scopes passed back to your WP site after the Google authorization
   were incorrect. Either authorization code: `code` URL parameter is empty or the
   scopes returned do not match a combination of “[https://mail.google.com/&#8221](https://mail.google.com/&#8221);
   and “[https://www.googleapis.com/auth/gmail.send&#8221](https://www.googleapis.com/auth/gmail.send&#8221);.
 * Without debugging your specific case I don’t know what the actual issue is.
 * > Do you know if there is a limit on the the number of times you can authorize
   an app using the same app and but different credentials using the same email 
   address?
 * Yes, the limit for connections with same oAuth2 credentials is around 25. Are
   you reaching this limit? If you have these 3 sites and this Google account is
   not used in other ~22 sites/apps (not just our plugin, but whatever Google account
   oAuth connection), then it should be OK.
 * > Lastly, is it necessary to fully delete the plugin and data when changing the
   Client Keys? If so, you may want to consider offering a way to flush the data
   from the plugin instead of having to delete then re-install.
 * If you don’t have any hard DB caching, then it should not cause issues and just
   changing the client Id and secret (+ saving the settings) should suffice.
 * Answers to your second post:
    1) yes, once you are authorized with Gmail mailer,
   you will be able to select the “From Email” form all your registered Gmail “Send
   as email” (aliases).
 * 2) No, the “From Email” will always be the authorized Gmail/G-suite address or
   its aliases.
 * 3) No, look at the #2 answer.
 * 4) Yes, if you change the authorized Google account’s password it may break the
   functionality and you would have to remove the connection and re-connect it in
   the plugin settings.
 * 5) Because in order for the Gmail API to work properly, it has to send the emails
   as the authorized Google account email address (or its aliases).
 * Take care!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Authentication Issue’ is closed to new replies.

 * ![](https://ps.w.org/wp-mail-smtp/assets/icon-256x256.png?rev=1755440)
 * [WP Mail SMTP by WPForms - The Most Popular SMTP and Email Log Plugin](https://wordpress.org/plugins/wp-mail-smtp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-mail-smtp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-mail-smtp/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-mail-smtp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-mail-smtp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-mail-smtp/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Gregor Capuder](https://wordpress.org/support/users/capuderg/)
 * Last activity: [5 years, 11 months ago](https://wordpress.org/support/topic/authentication-issue-6/#post-13126882)
 * Status: resolved