Due to recent updates to Google’s policies regarding less secure applications, it has become necessary to adjust the authentication method for the email client. After thoroughly reviewing the system and Google Cloud configurations, it was determined that all the necessary settings had been correctly implemented. However, when attempting to recover a password via the designated form, the user encountered a blank screen. A thorough examination of the configuration revealed no obvious errors. However, upon further investigation into the error log, it was discovered that there were specific lines of code indicating a PHP fatal error, as depicted in the attached image.
PHP Fatal error: Uncaught Error: Class ‘League\OAuth2\Client\Provider\Google’ not found in /var/www/html/lib/pkp/classes/mail/Mail.inc.php:495
I have searched the lib/pkp/lib/vendor directory, but I have not been able to locate the league package folder.
I then attempted to locate the composer.js file, as I suspected it might be in the dev dependency. However, I was unable to find “league/oauth2-google” either.
can you check this issue?
What application are you using?
OJS 3.3.0-11
Additional information
1 Like
yes I followed the instructions but there are no recommendations for oauth client, as I am configuring the oauth client and the class ‘League\OAuth2\Client\Provider\Google’ does not exist in /lib/pkp/classes/mail/Mail.inc.php for this reason it does not make the connection via oauth.
Hi @gsantos,
What is your [email]
configuration in config.inc.php
? (Please obscure usernames/passwords.)
Regards,
Alec Smecher
Public Knowledge Project Team
here is my configuration for the mail I commented again the configuration for the connection type XOAUTH2 of PHPMailer recommended for OJS due to the error occurred, I repeat I am doing this configuration with OAUTH authentication because Gmail stopped supporting in its SMTP connection to less secure applications.
Hi @gsantos,
As far as I know (I haven’t personally set this up recently), application-specific passwords are still possible using SMTP. See the Google documentation linked from our documentation I mentioned above. Are you sure this has been decommissioned?
Regards,
Alec Smecher
Public Knowledge Project Team
Because the mail is shared by several team members, it was not feasible to implement two-factor authentication. However, I managed to resolve the issue by following these steps:
- I downloaded the league/oauth2-google package into a separate project.
- I moved the oauth2-google and oauth2-client folders to the vendor folder.
- I included the mapping of the classes in the following files:
- autoload_classmap.php
- autoload_psr4.php
- autoload_static.php
It should be noted that all this was necessary because, to update the packages in OJS, special permissions are required.
Finally, I ran a test in a local environment, and the results were 10/10!
2 Likes
This topic was automatically closed after 9 days. New replies are no longer allowed.