remember-me

Remember me functionality in ASP.NET Form Authentication doesn't work

大憨熊 提交于 2019-12-18 11:56:29
问题 I'm using ASP.NET forms authentication for logging users into a website we're developing. Part of the functionality is a "Remember me" checkbox which remembers the user for a month if they check it. The code for logging the user in is as follows: public static void Login(HttpResponse response, string username, bool rememberMeChecked) { FormsAuthentication.Initialize(); FormsAuthenticationTicket tkt = new FormsAuthenticationTicket(1, username, DateTime.Now, DateTime.Now.AddMinutes(30),

How to get Chrome to remember login on forms?

一曲冷凌霜 提交于 2019-12-12 10:18:34
问题 On many websites when you login via Chrome it will offer to remember your login details. I have a login form and this does not happen. Here's the form: <form action="/login" method="post"> <label for="username">Email Address:</label> <input id="username" name="username" autofocus="autofocus" required="required" type="email" size="25" autocomplete="off"/> <label for="password">Password:</label> <input id="password" name="password" required="required" type="password" size="25" autocomplete="off

Via Remember me always return false

社会主义新天地 提交于 2019-12-12 10:14:21
问题 Before I posted this, I did some searching but still I don't know it always return false. My code is below html <input type="checkbox" name="remember"/> {{ trans('login.text_remember_me') }} controller $remember = ($request->has('remember')) ? true : false; if (Auth::attempt($credentials, $remember)) Then after successful logged-in. I checked the dd(Auth::viaRemember()); and it return false. Even changed my config/session.php setting 'expire_on_close' => true from false . Basically what I

remember me result is ignored by spring security, and i am still redirected to the login page

最后都变了- 提交于 2019-12-12 03:43:54
问题 My Spring Security XML is as following: <http use-expressions="true"> <intercept-url pattern="/login" access="isAnonymous()" requires-channel="https"/> <intercept-url pattern="/login/" access="isAnonymous()" requires-channel="https" /> <intercept-url pattern="/logout-success" access="isAnonymous()" /> <intercept-url pattern="/logout-success/" access="isAnonymous()" /> <intercept-url pattern="/logout" access="isAuthenticated()" /> <intercept-url pattern="/**" access="hasRole('ROLE_SUPER_ADMIN'

laravel remember me not working in chrome work in firefox

笑着哭i 提交于 2019-12-11 09:57:14
问题 As I mentioned in my post in my Laravel 4.1 application I have the "Remember me" option. When I connect in chrome with "Remember me" checked and close the browser and open it, it's working, even when I don't check it! But with Firefox it work perfectly. When I check "Remember me", close then open the browser I'm still connected. When I don't check it and connect, close then open the browser it return me to the login form with error message. I don't understand why it's not working in chrome.

RememberMe option in an asp.net web application

陌路散爱 提交于 2019-12-11 09:20:48
问题 Hai guys, what are the possible ways of implementing remember me option in an asp.net web application? alt text http://www.freeimagehosting.net/uploads/0f9ebba1bb.jpg 回答1: If you're using Forms Authentication, just pass true as a second argument to RedirectFromLoginPage. Otherwise, idea is essentially the same: you need to create a so-called "persistent cookie", which means that you have to specify correct cookie expiration date. 回答2: protected void Page_Load(object sender, EventArgs e) { if

Remember me functionality in Phoenix using Guardian

浪尽此生 提交于 2019-12-11 07:20:05
问题 I'm developing a login system for a web application using Guardian to handle authentication. In my Guardian config i have ttl: {30, :days} User's token is stored in cookies by calling: defp login(conn, user) do conn |> Guardian.Plug.sign_in(user) end Like this, token is valid for 30 days and stays there even if browser is closed (expected behaviour for a cookie). User, however, should be able to choose if being remembered or not during login. If not, token must be deleted from cookies upon

How to prolong the remember_me cookie on each request in Symfony2?

大憨熊 提交于 2019-12-11 05:23:42
问题 I use standard remember_me symfony feature, but it expires every period of time, set in config. E.g. I have lifetime set to 1800. Disregarding of what I do, it logs me off after 0.5 hours after last login. And I want it logs me off only after 0.5 hours of inactivity. Every request should prolong remember me cookie. Could this be done with just config or should I mess with kernel events and hack that manually? 回答1: There is indeed a way to do it only with configuration settings, but only in

Rails Auth, Remember me

烈酒焚心 提交于 2019-12-11 04:36:29
问题 I'm trying to add remember me functionality to my login form by following Ryan Bates's tutorial. However when I try to access my pages I get this error: Couldn't find User with auth_token = I think the problem is coming from my application_controller.rb class ApplicationController < ActionController::Base protect_from_forgery helper_method :current_user private def current_user @current_user ||= User.find_by_auth_token!(cookies[:auth_token]) if cookies[:auth_token] end end Here's the code

Before-Action method in symfony2

≯℡__Kan透↙ 提交于 2019-12-11 04:04:31
问题 I want to write a common code in my symfony2 application that should be executed before calling any action-method. How Can I do it? At the time of login-success, I am storing some data in session. If the user visit the application later with remember-me functionality. I want to restore the session data. The common code is to restore the session data. 回答1: The method to setup before and after Filters are available in the documentation. Please see the link http://symfony.com/doc/2.0/cookbook