Hi.
Trying to setup Google OAuth2 Login in my PHP project.
I am able to see the signin screen and select my account. But when Google redirects to my app, I get the below error:
{
"code": 0,
"file": "/var/www/html/dmxConnectLib/lib/oauth/Oauth2.php",
"line": 262,
"message": "Bad Request",
"trace": "#0 /var/www/html/dmxConnectLib/lib/oauth/Oauth2.php(230): lib\\oauth\\Oauth2->grant('authorization_c...', Array)\n#1 /var/www/html/dmxConnectLib/modules/oauth.php(24): lib\\oauth\\Oauth2->authorize(Array, Object(stdClass))\n#2 /var/www/html/dmxConnectLib/lib/App.php(195): modules\\oauth->authorize(Object(stdClass), 'OauthGoogleProv...', Array)\n#3 /var/www/html/dmxConnectLib/lib/App.php(159): lib\\App->execSteps(Object(stdClass))\n#4 /var/www/html/dmxConnectLib/lib/App.php(127): lib\\App->execSteps(Array)\n#5 /var/www/html/dmxConnectLib/lib/App.php(116): lib\\App->exec(Object(stdClass), false)\n#6 /var/www/html/dmxConnectLib/lib/App.php(94): lib\\App->exec(Object(stdClass))\n#7 /var/www/html/dmxConnect/api/OAuthRedirect.php(8): lib\\App->define(Object(stdClass))\n#8 {main}"
}
When running the same setup in Local docker, it all works fine. But when on remote server, it fails.
I tried re-checking the setup on my Google app, but all looks fine.
Please help.