Laravel Socialite - google login failed “Missing required parameter: code”

时光怂恿深爱的人放手 提交于 2019-12-11 01:59:35

问题


I have this strange issue with using Laravel Socialite to log users in via Google API.

Everything configurations seem normal and ordinary, but I keep getting

error Missing required parameter: code

But in localhost works fine

Localhost:

Server:

URI de redirection autorisés http://example.com/subdir/auth/google/callback http://localhost:8000/auth/google/callback


回答1:


After a long search, the solution is to remove the profile from scopes in vendor\laravel\socialite\src\Two\GoogleProvider.php

protected $scopes = [
    'openid',
    'email',
];


来源:https://stackoverflow.com/questions/52594661/laravel-socialite-google-login-failed-missing-required-parameter-code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!