OAuth2 Class Not Found Error PHP

I am trying to setup Google OAuth2 Login in a PHP project.
On local docker, it seems to we working well. But, I am not getting any information from the userinfo.email scope, after authorization redirect.
So, I tried deploying it to a test server, just in case it was a localhost issue.
But turns out, even the authorization part is not working on the server.

I get the following error when I open the login SA in browser:

{"code":0,"file":"\/var\/www\/html\/dmxConnectLib\/modules\/oauth.php","line":22,"message":"Class 'lib\\oauth\\Oauth2' not found","trace":"#0 \/var\/www\/html\/dmxConnectLib\/lib\/App.php(195): modules\\oauth->authorize(Object(stdClass), 'GoogleLogin', Array)\n#1 \/var\/www\/html\/dmxConnectLib\/lib\/App.php(159): lib\\App->execSteps(Object(stdClass))\n#2 \/var\/www\/html\/dmxConnectLib\/lib\/App.php(127): lib\\App->execSteps(Array)\n#3 \/var\/www\/html\/dmxConnectLib\/lib\/App.php(116): lib\\App->exec(Object(stdClass), false)\n#4 \/var\/www\/html\/dmxConnectLib\/lib\/App.php(94): lib\\App->exec(Object(stdClass))\n#5 \/var\/www\/html\/dmxConnect\/api\/OAuthLogin.php(8): lib\\App->define(Object(stdClass))\n#6 {main}"}

I saw a very old post saying that there was some file naming issue. But even after deleting the dmxConnectLib folder & recreating, the error still remains. Please help.

Community Page
Last updated: