与现有的ASP.NET成员资格集成Facebook的身份验证 [英] Integrating Facebook Authentication with existing ASP.NET Membership
问题描述
编码平台:ASP.NET 4.0的WebForms用C#
Coding Platform: ASP.NET 4.0 WebForms with C#
我们必须与ASP.NET成员资格提供管理现有的登录信息网站。结果
现在的客户希望Facebook连接到它。
We have a website with the existing login details managed by ASP.NET Membership Provider.
Now client wants to add Facebook Connect to it.
于是就报名我使用Facebook的按钮给予注册。结果
我应如何着手从Facebook身份验证成功整合到我的会员供应商?
So on registration I am giving a Register using Facebook Button.
How shall I proceed with integrating a successful authentication from facebook to my membership provider?
什么我计划是创建具有唯一标识符,在ASP.NET成员新用户并链接一个用户名,要包含其他开放式ID用户的另一个表(在未来的COS,我们计划扩大到谷歌,Twitter的,生活和所有)。那是最好的方法是什么?
What I am planning is to create a username with unique identifier as a new user in ASP.NET Membership and link that to another table that contains other open-id users(cos in future we plan to extend to Google, Twitter, Live and all). Is that the best method?
推荐答案
好吧,我想你有两个选择这里。
Well, I think that you have two options here.
选项A:
使用 Facebook的注册插件然后得到注册成为普通用户即没有FB用户ID的用户存储到分贝,你只有一种类型的用户。
Option A: Use the Facebook Registration Plugin and then get the user registered as a regular user i.e. no FB user id is stored into the db, you only have one type of user.
选项B:
问电子邮件的权限与FB中连接并获取用户的电子邮件,以比较的user表,使如果一场比赛(与FB UID user表ID),它的发现为你的数据库。
Option B: Ask for email permission within your FB connect and get the user email in order to compare against your user table and make a match (your user table id with FB uid) in case it's found into your DB.
心连心!
这篇关于与现有的ASP.NET成员资格集成Facebook的身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!