Laravel 8 + Socialite + Google Login = Error with no message

After struggling for three hours, and making a useless bunch of changes in my code and server configuration, I finally found the solution to this:

  • When you finish your coding, and test it in your localhost deployment, you can login using Google and there’s no problem in getting all the user profile information.
  • Then you deploy the application in your cloud server environment and a “no message” error appears and doesn’t allow you to log into your application.
  • Laravel Socialite Google Login Error with No Message
    Laravel Socialite Google Login Error with No Message