我想在Yii 2应用程序中实现社交登录。
我检查了以下repo
但是当我在composer.json文件中需要它时,它会抛出以下错误
Problem 1
- Installation request for nodge/yii2-eauth dev-master -> satisfiable by nodge/yii2-eauth[dev-master].
- nodge/yii2-eauth dev-master requires yiisoft/yii2 dev-master@dev -> no matching package found.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.
我研究了替代图书馆,但没有运气。任何其他yii2扩展,我可以使用Facebook登录用户?
答案 0 :(得分:1)
为正确的库运行以下composer命令... 它对我有用......
composer require --prefer-dist yiisoft/yii2-authclient "*"
答案 1 :(得分:0)
我使用的是Yii 1.x,我使用插件YUM(Yii用户管理)实现了登录系统。 我在修复错误和添加Facebook登录功能方面遇到了很多麻烦。 最后,我决定为登录系统编写自己的代码。
在我看来,最好依赖第三方插件。每次Facebook(或Twitter等)更改其API时,您都不会有更新自己代码的麻烦。这是开源软件的好处之一。
我强烈推荐HybridAuth:http://hybridauth.sourceforge.net/
它为每个PHP框架都有插件: http://hybridauth.sourceforge.net/plugins.html