How to add facebook login to my own website?

前端 未结 3 604
不思量自难忘°
不思量自难忘° 2020-12-28 09:10

Stackoverflow uses different ways to login to their website, e.g. with the facebook login.

With the facebook social plug-ins (see social plugins) you can add a like

3条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-28 09:34

    The Facebook Login plugin only provides a way for you to log the user into your website. You must do the Link to your internal system yourself (as StackOverflow does). This means creating a new "User" based on the Facebook User's details.

    For example, if you website uses email address as the "username", then you must ask facebook users to provide their email address or ask for the email address permission. Then, you create a new account for the user and give them a random password.

    You must also change the login flow so existing users can sign-in with their email / password or their associated Facebook Account.

提交回复
热议问题