I have an mvc website that is using the asp.net membership database.
I am wanting to enhance the website to allow users to use their facebook details to log into my site.
I use the database for membership and role management, I have a number of other related tables based on the userid created when a new user is added.
I want to be able to allow users to use facebook to login however I still need all the features of the standard membership provider.
I have hooked in the facebook api and im getting everything I need like name,facebook id and age.
I want to develop something that can be reused as some type of helper.
Do I
- Create a new class and inherit from the MembershipProvider
- Create my own insert methods using the data from facebook to create the new account within my new membership provider
- Use the facebook Id as the username
- Create a final registration page to capture anything that facebook doesnt provide to populate the other required tables.
If I create this membership provider in a seperate project (so I can reuse) can I use the entity framework to do all of my inserts and edits? I know I have to reference the database's name however what if I want to use this .dll again in another project where the database name is different.
Thanks for any suggestions