• <bdo id='dGURn'></bdo><ul id='dGURn'></ul>
    <i id='dGURn'><tr id='dGURn'><dt id='dGURn'><q id='dGURn'><span id='dGURn'><b id='dGURn'><form id='dGURn'><ins id='dGURn'></ins><ul id='dGURn'></ul><sub id='dGURn'></sub></form><legend id='dGURn'></legend><bdo id='dGURn'><pre id='dGURn'><center id='dGURn'></center></pre></bdo></b><th id='dGURn'></th></span></q></dt></tr></i><div id='dGURn'><tfoot id='dGURn'></tfoot><dl id='dGURn'><fieldset id='dGURn'></fieldset></dl></div>
  • <small id='dGURn'></small><noframes id='dGURn'>

      1. <tfoot id='dGURn'></tfoot><legend id='dGURn'><style id='dGURn'><dir id='dGURn'><q id='dGURn'></q></dir></style></legend>

        yii2、google outh2 和范围

        yii2, google outh2 and scope(yii2、google outh2 和范围)
          <tbody id='qPZyk'></tbody>
          <bdo id='qPZyk'></bdo><ul id='qPZyk'></ul>

            <i id='qPZyk'><tr id='qPZyk'><dt id='qPZyk'><q id='qPZyk'><span id='qPZyk'><b id='qPZyk'><form id='qPZyk'><ins id='qPZyk'></ins><ul id='qPZyk'></ul><sub id='qPZyk'></sub></form><legend id='qPZyk'></legend><bdo id='qPZyk'><pre id='qPZyk'><center id='qPZyk'></center></pre></bdo></b><th id='qPZyk'></th></span></q></dt></tr></i><div id='qPZyk'><tfoot id='qPZyk'></tfoot><dl id='qPZyk'><fieldset id='qPZyk'></fieldset></dl></div>

              <legend id='qPZyk'><style id='qPZyk'><dir id='qPZyk'><q id='qPZyk'></q></dir></style></legend>
              • <small id='qPZyk'></small><noframes id='qPZyk'>

              • <tfoot id='qPZyk'></tfoot>
                  本文介绍了yii2、google outh2 和范围的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在使用 Yii2、GoogleOAuth 和 yii2-user 扩展.我想接收用户谷歌圈子并将范围设置为我的配置:

                  'authClientCollection' =>['类' =>'yiiauthclientCollection','客户' =>['谷歌' =>['类' =>'yiiauthclientclientsGoogleOAuth','clientId' =>'758709912345-p4qp4lqihit5un1u6qb75msqp5m5j6d8.apps.googleusercontent.com','clientSecret' =>'ZygOIi1-0asfktUQ1pKOFOo','范围' =>'https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/drive',],],]

                  当我使用 Google OAuth2 登录时出现错误:

                  <块引用>

                  异常 – yiiauthclientInvalidResponseException请求失败,代码:400,消息:{错误":redirect_uri_mismatch"}

                  谷歌回复:

                  <预><代码>['网址' =>'https://accounts.google.com/o/oauth2/token''content_type' =>'应用程序/json''http_code' =>400'header_size' =>435'request_size' =>644'文件时间' =>-1'ssl_verify_result' =>0'redirect_count' =>0'total_time' =>0.115431'namelookup_time' =>0.001186'connect_time' =>0.025188'pretransfer_time' =>0.076275'size_upload' =>456'size_download' =>39'speed_download' =>337'speed_upload' =>3950'download_content_length' =>-1'upload_content_length' =>456'starttransfer_time' =>0.114206'redirect_time' =>0'证书信息' =>[]'primary_ip' =>'2a00:1450:4010:c08::54''primary_port' =>443'local_ip' =>'2a03:6f00:1::5c35:726b''local_port' =>33160'redirect_url' =>''

                  ]

                  当我从配置 Google+ 范围中删除时(https://www.googleapis.com/auth/plus.login) 授权没有错误,谷歌的回应是:

                  <预><代码>['网址' =>'https://accounts.google.com/o/oauth2/token''content_type' =>'应用程序/json;字符集=utf-8''http_code' =>200'header_size' =>522'request_size' =>526'文件时间' =>-1'ssl_verify_result' =>0'redirect_count' =>0'total_time' =>0.13719'namelookup_time' =>0.001212'connect_time' =>0.026261'pretransfer_time' =>0.079765'size_upload' =>338'size_download' =>900'speed_download' =>6560'speed_upload' =>2463'download_content_length' =>-1'upload_content_length' =>338'starttransfer_time' =>0.136241'redirect_time' =>0'证书信息' =>[]'primary_ip' =>'2a00:1450:4010:c08::54''primary_port' =>443'local_ip' =>'2a03:6f00:1::5c35:726b''local_port' =>37583'redirect_url' =>''

                  ]

                  问题仅在 https://www.googleapis.com/auth/plus.login 中.我启用的 API:http://minus.com/lJ5nw7caXJApD

                  解决方案

                  您还可以在身份验证客户端配置中显式添加 returnUrl.查看文档了解更多信息.

                  I am using Yii2, GoogleOAuth and yii2-user extension. I want to receive user google circles and set scope to my config:

                  'authClientCollection' => [
                          'class' => 'yiiauthclientCollection',
                          'clients' => [
                              'google' => [
                                  'class' => 'yiiauthclientclientsGoogleOAuth',
                                  'clientId' => '758709912345-p4qp4lqihit5un1u6qb75msqp5m5j6d8.apps.googleusercontent.com',
                                  'clientSecret' => 'ZygOIi1-0asfktUQ1pKOFOo',
                                  'scope' => 'https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/drive',
                              ],
                          ],
                      ]
                  

                  When I login with Google OAuth2 I had error:

                  Exception – yiiauthclientInvalidResponseException Request failed with code: 400, message: { "error" : "redirect_uri_mismatch" }

                  Google response:

                  [
                  'url' => 'https://accounts.google.com/o/oauth2/token'
                  'content_type' => 'application/json'
                  'http_code' => 400
                  'header_size' => 435
                  'request_size' => 644
                  'filetime' => -1
                  'ssl_verify_result' => 0
                  'redirect_count' => 0
                  'total_time' => 0.115431
                  'namelookup_time' => 0.001186
                  'connect_time' => 0.025188
                  'pretransfer_time' => 0.076275
                  'size_upload' => 456
                  'size_download' => 39
                  'speed_download' => 337
                  'speed_upload' => 3950
                  'download_content_length' => -1
                  'upload_content_length' => 456
                  'starttransfer_time' => 0.114206
                  'redirect_time' => 0
                  'certinfo' => []
                  'primary_ip' => '2a00:1450:4010:c08::54'
                  'primary_port' => 443
                  'local_ip' => '2a03:6f00:1::5c35:726b'
                  'local_port' => 33160
                  'redirect_url' => ''
                  

                  ]

                  When I removed from the configuration Google+ scope(https://www.googleapis.com/auth/plus.login) authorization go with out error and Google response is:

                  [
                  'url' => 'https://accounts.google.com/o/oauth2/token'
                  'content_type' => 'application/json; charset=utf-8'
                  'http_code' => 200
                  'header_size' => 522
                  'request_size' => 526
                  'filetime' => -1
                  'ssl_verify_result' => 0
                  'redirect_count' => 0
                  'total_time' => 0.13719
                  'namelookup_time' => 0.001212
                  'connect_time' => 0.026261
                  'pretransfer_time' => 0.079765
                  'size_upload' => 338
                  'size_download' => 900
                  'speed_download' => 6560
                  'speed_upload' => 2463
                  'download_content_length' => -1
                  'upload_content_length' => 338
                  'starttransfer_time' => 0.136241
                  'redirect_time' => 0
                  'certinfo' => []
                  'primary_ip' => '2a00:1450:4010:c08::54'
                  'primary_port' => 443
                  'local_ip' => '2a03:6f00:1::5c35:726b'
                  'local_port' => 37583
                  'redirect_url' => ''
                  

                  ]

                  Problem only in https: //www.googleapis.com/auth/plus.login . My enabled APIs: http://minus.com/lJ5nw7caXJApD

                  解决方案

                  You can also add returnUrl explicitly in your auth client configuration. Look at docs for more info.

                  这篇关于yii2、google outh2 和范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)

                  1. <small id='twhzc'></small><noframes id='twhzc'>

                      • <bdo id='twhzc'></bdo><ul id='twhzc'></ul>
                        • <legend id='twhzc'><style id='twhzc'><dir id='twhzc'><q id='twhzc'></q></dir></style></legend>

                          <i id='twhzc'><tr id='twhzc'><dt id='twhzc'><q id='twhzc'><span id='twhzc'><b id='twhzc'><form id='twhzc'><ins id='twhzc'></ins><ul id='twhzc'></ul><sub id='twhzc'></sub></form><legend id='twhzc'></legend><bdo id='twhzc'><pre id='twhzc'><center id='twhzc'></center></pre></bdo></b><th id='twhzc'></th></span></q></dt></tr></i><div id='twhzc'><tfoot id='twhzc'></tfoot><dl id='twhzc'><fieldset id='twhzc'></fieldset></dl></div>
                            <tbody id='twhzc'></tbody>
                          <tfoot id='twhzc'></tfoot>