问题标签 [hwioauthbundle]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
1609 浏览

symfony - symfony2 HWIOAUTHBUNDLE 配置

我正在为我的应用程序处理社交网络登录/注册。

我用过 HWIOAUTHBUNDLE。它在我的开发服务器上运行良好,但我已将代码上传到我的实时服务器,它给了我以下错误:

找不到路径“/oauth-login/check-google”的控制器。也许您忘记在路由配置中添加匹配的路由?

我正在与您分享我的配置文件:

路由.yml

安全.yml

配置.yml

0 投票
1 回答
465 浏览

facebook - HWIOAuthBundle 是否支持检索好友列表、性别、国家

我刚刚在我的 symfony 项目中实现了 HWIOAuthBundle。实际上,它是用facebook配置的,我想知道它是否支持检索朋友列表、性别和国家?

如果是,您能否为我提供该功能的代码示例public function loadUserByOAuthUserResponse(UserResponseInterface $response)

这真的很有帮助。

谢谢。

0 投票
0 回答
136 浏览

facebook - 从 Facebook 获取图片时出现 hwiOAuthBundle 错误

我会使用官方文档配置 oAuth 连接。除了从 facebook 获取个人资料图片之外的所有工作。

前端将有效用户重定向到自定义用户捆绑寄存器(需要更多数据)

奇怪的部分:当我尝试使用“infos_url”参数时,它会将经过验证的用户重定向到原始注册表单,而不是自定义注册表单。要么使用获取数据的自定义 FOSUserProvider。

有任何想法吗?

0 投票
1 回答
413 浏览

facebook - 即使是找到的 facebook 用户,getNickname() 也会返回 null

我正在尝试public function loadUserByOAuthUserResponse(UserResponseInterface $response)在 HWIOAuthBundle 中实现该方法。当用户登录他的 facebook 帐户时,我注意到getNickname()即使为该用户指定了它,它也始终返回 null。

这正常吗?

0 投票
2 回答
14364 浏览

symfony - 如何指定 Google API 的范围以获取生日

我正在尝试birthday从 Google API 获取,但检索到的数据HWIOAuthBundle不包含它。

我想知道google plus apiconfig.yml 中指定的范围是否正确!

如果没有,请提供链接或更正的范围。

0 投票
0 回答
59 浏览

symfony - 例如,写入从 google api 检索到的数据的日志

例如,我正在尝试制作一些从 google api 获得var_dump()的变量 。$attr = $response->getResponse();但我无法做到这一点。

是否可以将其写在app/log/dev.log for example?

下边是

0 投票
2 回答
851 浏览

php - 尝试将参数注入自定义 OAuthUserProvider

在阅读文档后,我按照此处的示例添加了 HWIOAuthBundle。我被重定向到谷歌就好了,但是当它返回时,我收到一个警告说第一个参数丢失。

配置.yml

安全.yml

路由.yml

OAuthUserProvider.php

错误:

警告:WX\ExchangeBundle\Service\OAuthUserProvider::__construct() 缺少参数 1,在 /opt/lampp/htdocs/workoutexchange/trunk/WorkoutExchange/vendor/hwi/oauth-bundle/HWI/Bundle/OAuthBundle/OAuth/ 中调用第 186 行的 ResourceOwner/AbstractResourceOwner.php 并在第 13 行的 /opt/lampp/htdocs/workoutexchange/trunk/WorkoutExchange/src/WX/ExchangeBundle/Service/OAuthUserProvider.php 中定义

0 投票
1 回答
516 浏览

php - Symfony2 - Openshift " PHP Fatal error: Class 'HWI\\Bundle\\OAuthBundle\\HWIOAuthBundle' not found

I've been trying to create a simple Symfony 2.5 Project with HWI Oauth bundle .

The projects works perfectly on my local Windows Machine I managed to do facebook Oauth Authentification

But i uploaded my project to an Openshift server and i keep getting this error

" PHP Fatal error: Class 'HWI\Bundle\OAuthBundle\HWIOAuthBundle' not found in /var/lib/openshift/5395dfb2500446b159000374/app-root/runtime/repo/symfo/app/AppKernel.php on line 21"

Same problem with a personnal debian server . I can't update my project with composer because of that , neither can I do

Both are blocked . So i did a new project from sractch , added the package to the composer.json , and did a composer install on the server . Still same problem .

I tend to think either it's a case sensitive problem , but i double-checked and i can't find where. Or either I need to register this bundle somewhere else in my project . But i have no idea where .

Also when i Push my project with git to my openshift server , the whole project gets uploaded , but not the HWI Bundle . I dont know why ... composer.json

0 投票
1 回答
1652 浏览

php - facebook和github登录Symfony2.1中的HWIOAuthBundle和FOSUserBundle

我已经按照教程http://m2mdas.github.io/blog/2013/11/21/integrate-hwioauthbundle-with-fosuserbundle/使 Github 登录工作,它几乎似乎在我点击登录时工作登陆 github 登录页面,我可以在 github 仪表板中看到 1 个用户在我的 github 应用程序上注册。但我没有在 Symfony 中进行身份验证。在底部的 symfony 工具栏上,它仍然显示我是匿名用户,而且我的表 fos_user 中没有添加新行。

对于 facebook 登录,当我单击 facebook 的生成器登录链接时,它给我错误“应用程序配置不允许给定 URL。:应用程序的设置不允许一个或多个给定 URL。它必须匹配网站 URL 或画布 URL,或者域必须是应用程序域之一的子域。”

我的另一个疑问是,在教程中,routing.yml 中说要放置,

由于没有指定控制器或资源,我应该将什么作为控制器操作路径或资源放在这里?

配置.yml

fos_user: db_driver: orm # 其他有效值为 'mongodb', 'couchdb' 和 'propel' firewall_name: main user_class: Les\UserBundle\Entity\User registration:confirmation: enabled: true

hwi_oauth: # 此捆绑包处于活动状态的防火墙名称,必须设置此设置 firewall_name: secure_area connect:confirmation: true #account_connector: hwi_oauth.user.provider.fosub_bridge #registration_form_handler: hwi_oauth.registration.form.handler.fosub_bridge #注册表格:fos_user.registration.form

安全.yml

安全性:编码器:FOS\UserBundle\Model\UserInterface:sh​​a512

路由.yml

实体/user.php

0 投票
0 回答
454 浏览

symfony - 连接到 LinkedIn oAuth 时出现内容编码错误

我已经配置了 2 个提供程序并使用了 FOS-Oauth-Bridge。FB 工作得很好,但是当我尝试连接到 LinkedIn 时,浏览器会显示消息

内容编码错误

您尝试查看的页面无法显示,因为它使用了无效或不受支持的压缩形式。

我尝试解码生成的 URL,这似乎很好: https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=077-dd7c-4815-aea0-8c31e0ce7&scope=r_fullprofile&state=eecd50f81e6ad3e7e23cc11ec50d4768&redirect_uri=http%3A% 2F%2Fsf2test.dv%2Fapp_dev.php%2Fsec_area%2Flogin%2Fcheck-linkedin

我尝试将重定向 URL 更改为 127.0.0.1,将端口更改为 8X 但没有任何效果

我的 Windows / Apache 上没有安装 SSL

当我手动将 LinkedIn URL 更改为 HTTP(而不是 HTTPS)时,我收到此消息 Request denied

有人可以帮我解决问题吗?