我想使用复选框在登录页面中添加记住我的功能 [英] i want to add remember me feature in login page using checkbox

查看:94
本文介绍了我想使用复选框在登录页面中添加记住我的功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在登录页面中添加记住我的功能,使用复选框

i want to add remember me feature in login page using checkbox

推荐答案

如果您使用成员 [ ^ ],然后它已经存在,作为成员身份启用的登录控件的一部分。如果你不是,那么你在网站的每个阶段都会让自己的生活变得困难,并且可能会大幅降低安全性。



如果你必须家里酿造安全机制,然后添加记住我并不困难 - 你所要做的就是添加一个cookie值,即用户ID,然后在用户登录时存储并在加载时读取它一页。



但如果我是你,我会使用会员资格。
If you are using Membership[^], then it is already there, as part of the Membership enabled Login control. If you aren''t, then you are making life difficult for yourself at every stage of your website, and probably reducing security by a significant amount.

If you must home brew the security mechanism, then it isn''t difficult to add "remember me" - all you have to do is add a cookie value which is the user id, then store it when the user logs in and read it when you load a page.

But I''d use Membership instead if I was you.


这篇关于我想使用复选框在登录页面中添加记住我的功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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