Integration of Facebook and asp.net membership

前端 未结 2 1305
星月不相逢
星月不相逢 2021-02-04 22:18

I want to allow users to sign up to my website using Facebook. I already use the JS SDK on the client side for authentication and authorization and the C# sdk on the server side

2条回答
  •  攒了一身酷
    2021-02-04 23:11

    1 option: You should generate a password and send it by email to the user, for example:

    Welcome to my superwebsite.com, login: foo@foo.com password:dhyfd46

    Then if you see that the password is the original (generated) ask the user to change it for another one.

    2nd option: you will never use a password, for you an account is a tuple (facebookID,email) (you will get it from the facebook Api) and if it will match this (the user will click om 'login with facebook', you will be able to create the user session

    After the Edit:

    Why not using the tuple (userId,facebookId) and if you have the fb Id you know the userId?

提交回复
热议问题