As I run script on localhost works fine. but on server showing 403 error:
in my google console
for redirect url -
xyz.com/change/googlelogin
in my browser - after login with google auth it show me like -
xyz.com/change/googlelogin?code=4/sgAnQ7T_O5l7bDPgaMQ4_s-c0Abz_wxsVPIt5bPQdaklIdF0QyoQicTXyW7CUQHh5ScUBZ4GYyyV8cZyiX-mu3s&scope=email%20profile%20https://www.googleapis.com/auth/userinfo.profile%20https://www.googleapis.com/auth/userinfo.email with above error
This is because of modesecurity restrictions from your hosting provider. Request them to disable for your domain. I was facing same issue ,i contacted support center and they fixed issue. Now it is working fine.