我在使用 Laravel Socialite 通过 Google API 登录用户时遇到了这个奇怪的问题。
一切配置看似正常又普通,但我不断发现
错误缺少必需的参数:代码
但在本地主机上工作正常
Localhost:
Server:
自动重定向的 URIhttp://example.com/subdir/auth/google/callback http://example.com/subdir/auth/google/callback
http://localhost:8000/auth/google/callback http://localhost:8000/auth/google/callback
经过长时间的搜索,解决方案是删除profile
from scopes
in vendor\laravel\socialite\src\Two\GoogleProvider.php
protected $scopes = [
'openid',
'email',
];
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)