简体   繁体   English

Symfony 2.8:无FOSUserBundle的Linkedin和Facebook身份验证

[英]Symfony 2.8: Linkedin & Facebook authentication without FOSUserBundle

My application should be using 3 types of sign up/in: simple form, linkedin, facebook. 我的应用程序应该使用3种类型的注册/登录:简单表单,linkedin,facebook。

My Entity is implementing UserInterface, \\Serializable which means I am not using FOSUserBundle, because my registration is customized by my needs. 我的实体正在实现UserInterface, \\Serializable ,这意味着我不使用FOSUserBundle,因为我的注册是根据我的需要定制的。 I have already finished sign up/in forms and is working perfectly according my needs. 我已经完成了申请表/表格,并且可以根据自己的需求正常工作。

When I am googling the isue about authentication via linkedin and facebook in Symfony, I get bundles that uses FOSUserBundle (ie HWIOAuthBundle). 当我在Symfony中搜索有关通过Linkedin和Facebook进行身份验证的问题时,我得到了使用FOSUserBundle(即HWIOAuthBundle)的捆绑软件。 Should I start creating linkedin and facebook authentication using FOSUserBundle and keep form authentication without, or is there a possibility to not use FOSUserBundle? 我应该开始使用FOSUserBundle创建linkedin和Facebook身份验证,并且不使用表单身份验证,还是可以不使用FOSUserBundle?

Thank you in advance! 先感谢您!

Use HWIOAuthBundle. 使用HWIOAuthBundle。 It does not require FOSUserBundle. 不需要 FOSUserBundle。 It allows you to also use with FOSUserBundle, which you're not wanting so just ignore that part of the documentation. 它可以让你 FOSUserBundle,这你不想那么忽略文档的一部分使用。

I would have added this as a comment, but I don't have enough reputation yet. 本来可以将此添加为评论,但是我还没有足够的声誉。

I would also encourage you to look at the Guard component of Symfony as of 2.8. 我也鼓励您从2.8开始查看Symfony的Guard组件。 Before 2.8 it was supplied as a bundle. 在2.8之前,它是作为捆绑提供的。 Here it is: https://symfony.com/doc/current/cookbook/security/guard-authentication.html#main 这是: https : //symfony.com/doc/current/cookbook/security/guard-authentication.html#main

I'm not sure it will be helpful to you, but hope one of the above will help you along your journey. 我不确定这对您是否有帮助,但是希望以上内容之一对您的旅途有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM