首页 > 解决方案 > 谷歌登录codeigniter上的范围电子邮件问题

问题描述

对不起,我再次重复我的问题,因为我没有得到任何答案,但我希望今天我会。现在,我已经使用 CodeIgniter 创建了谷歌登录,它运行良好,当我点击下一步按钮填写所有详细信息后点击登录页面时,Google image它会将我从谷歌登录到我的网站,并且 URL 看起来像

https://example.com/google_login?code=4/lQDGQ6sJog3ZrLKGJtn-VVD3rbzgJl16jMLUrk6wzBIbsu-F6mjlLuPOepeobDLmFYqQL25jo4iAgI9ZnVKTSVY&scope=email%20profile%20https://www.googleapis.com/auth/userinfo.email%20https://www.googleapis.com/auth/userinfo.profile

这向我显示 404 错误,但如果我删除

&scope=email%20profile%20https://www.googleapis.com/auth/userinfo.email%20https://www.googleapis.com/auth/userinfo.profile从 URL 然后它向我显示客户的所有信息。

请帮我

谢谢你

标签: phpcodeignitergoogle-apigoogle-signin

解决方案


我试过没有在 routes.php 中添加路由并且它可以工作(删除的字符串放在里面$this->input->get('scope'))。

您可能需要在 routes.php 中添加路由。如果路由匹配谷歌响应 url,请将其链接到您的控制器。


推荐阅读