【问题标题】:How to setup the redirect url from Homestead using Socialite with Google?如何使用 Socialite 和 Google 设置 Homestead 的重定向 URL?
【发布时间】:2019-09-13 02:43:39
【问题描述】:

当您尝试使用 Homestead(在 Ubuntu 上)为 Laravel 设置 Socialite 时,Google 登录所需的“重定向 url”总是被标记为“坏”:

Error: invalid_request

Invalid parameter value for redirect_uri: Non-public domains not allowed: https://homestead.test/google/callback

并尝试添加 http://homestead.test/google/callbackhttp://192.168.10.10/google/callback 以作为:

"Non top level domain supported"

或者只是用

"Non valid URI"

由于谷歌的限制,它是无望的还是有什么办法?

【问题讨论】:

    标签: laravel homestead google-login laravel-socialite


    【解决方案1】:

    啊,找到了!简短回答:

    使用您绕过的真实 tld 域编辑您的 /etc/hosts:

    192.168.10.10   example.com
    

    然后告诉谷歌接受它:

    https://console.developers.google.com/apis/credentials/consent?project=xxx https://console.developers.google.com/apis/credentials?project=xxx

    【讨论】:

    • 看来您必须是 G Suite 用户才能执行此操作
    猜你喜欢
    • 2016-05-03
    • 2020-08-11
    • 2018-08-09
    • 1970-01-01
    • 2018-04-17
    • 1970-01-01
    • 2017-06-16
    • 1970-01-01
    • 2011-01-22
    相关资源
    最近更新 更多