Hello. Today I found a problem with user login. User gets ERROR500 page when using Google Login Osclass Plugin and PWA Osclass Plugin together. We get an error:
[05-Jul-2022 19:33:41 Europe/Kiev] PHP Fatal error: Uncaught Google_AuthException: Error fetching OAuth2 access token, message: 'invalid_grant' in /home2/ukagroco/public_html/oc-content/plugins/google_login/src/auth/Google_OAuth2.php:112
Stack trace:
#0 /home2/ukagroco/public_html/oc-content/plugins/google_login/src/Google_Client.php(131): Google_OAuth2->authenticate(Array, '4/0AX4XgWhdxnKC...')
#1 /home2/ukagroco/public_html/oc-content/plugins/google_login/index.php(52): Google_Client->authenticate('4/0AX4XgWhdxnKC...')
#2 /home2/ukagroco/public_html/oc-includes/osclass/classes/Plugins.php(42): ggl_callback()
#3 /home2/ukagroco/public_html/oc-includes/osclass/helpers/hPlugins.php(34): Plugins::runHook('init')
#4 /home2/ukagroco/public_html/oc-includes/osclass/core/BaseModel.php(70): osc_run_hook('init')
#5 /home2/ukagroco/public_html/oc-includes/osclass/controller/custom.php(28): BaseModel->__construct()
#6 /home2/ukagroco/public_html/index.php(169): CWebCustom->__construct()
#7 {main}
thrown in /home2/ukagroco/public_html/oc-content/plugins/google_login/src/auth/Google_OAuth2.php on line 112
The error itself is not always formed, but only for a certain set of events.
The order is as follows: The user enters the site and installs the PWA Osclass Plugin, but continues to stay in his Internet browser, then the user decides to log in to the site, but he is in the browser and not in the application. Having passed the Google Login Osclass Plugin authorization, the user gets to the ERROR500 page. If if the PWA Osclass Plugin is authorized, there is no error. If you log in there is no error in the browser. And if you have an application and you log in to the browser, we get an error.
Sorry for my English, if it's not clear, I'll try to explain somehow.