用于电子邮件注册的ASP.NET登录流程& Facebook的 [英] ASP.NET Login Flow for Email signups & Facebook

查看:77
本文介绍了用于电子邮件注册的ASP.NET登录流程& Facebook的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为ASP.NET站点构建注册/登录系统。我是Facebook整合的新手,但我最终弄明白了。对于我们的用户,我们希望允许他们通过Facebook或通过电子邮件/密码的标准方法进行注册。



我将电子邮件方法存储到SQL数据库中。我正在从Facebook检索值(用户ID,名称,位置等),并且还需要将这些值存储在数据库中。我在Master Page处理所有这些。



所以我的问题的答案可能是你的意见,但是管理这两个不同登录的最佳方法是什么类型?我正在考虑使用会话变量来持久登录,并从任一源(Facebook或标准)设置这些变量。这是要走的路,还是cookie或者视图状态更好的方法?

I am building the signup/login system for an ASP.NET site. I'm new to the Facebook integration, but I eventually figured it out. For our users, we want to allow them to signup via Facebook or through the standard method of email/password.

I am storing the email method into a SQL database. I am retrieving the values from Facebook (User ID, name, location etc) and need to store those values in the DB as well. I am handling all of this in the Master Page.

So the answer to my question may be your opinion, but what is the best method to manage the two different login types? I am considering using session variables to persist the login, and setting those variables from either source (Facebook or standard). Is that the way to go, or are cookies or viewstates a better method?

推荐答案

会话不是持久性的,它会过期。 Viewstate不那么持久,它持续一页,如果为同一页面发送GET,它甚至会消失。 Cookies是唯一真正的选择。



您还应该对他们提到的三件事做一些阅读,以便您更好地理解它们。
Session is not persistence, it expires. Viewstate is less persistent, it lasts for a page and even then goes away if a GET is sent for that same page. Cookies are the only real option.

You should also do some reading on the three things they mentioned, so you understand them better.


这篇关于用于电子邮件注册的ASP.NET登录流程& Facebook的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆