remember-me

Create a symfony2 remember me cookie manually (FOSUserBundle)

不想你离开。 提交于 2019-11-30 00:54:24
Could somebody explain how you can manually create a remember me cookie in a controller? I want the users to stay logged in after they pressed the "register" button, without having to login with their credentials afterwards. I've tried to create a cookie manually but i'm guessing the cookie value is incorrect, and therefor the "remember me" functionality doesn't work. A cookie with the correct name gets set. I've checked that. The remember me functionality works as expected when using the normal login procedure with the user's credentials. security.yml security.yml remember me security:

“Remember Me On This Computer” - How Should It Work?

旧时模样 提交于 2019-11-29 20:20:26
Looking at Gmail's cookies it's easy to see what's stored in the "remember me" cookie. The username/one-time-access-token. It could be implemented differently in cases where the username is secret, as well. But whatever... the thing is not very high security: you steal the cookie and you're ready to go. My question is on the functional side, however: when do you wipe their access tokens? If a user logs in without clicking "remember me" on another machine, should it invalidate their access tokens on all machines ? I'm asking about how this is traditionally implemented, and also how it should be

Best way for hashing a “remember me” cookie token

夙愿已清 提交于 2019-11-29 19:59:00
问题 I'm trying to implement a " remember me " feature, following the guidelines provided here: The definitive guide to form-based website authentication, and here: http://fishbowl.pastiche.org/2004/01/19/persistent_login_cookie_best_practice/ It appears that the "cookie token" should be hashed when stored in DB (if an attacker has access to DB, unhashed tokens look like plain login/passwords, allowing to log in on the website). Looking for a good hashing algorithm, I've found this recommended

Symfony2: “Remember me” tries to authenticate by username instad of email

泪湿孤枕 提交于 2019-11-29 16:51:12
I have an application with user authenticaton against database. The property I use is email: providers: administrators: entity: class: CorabMainBundle:User property: email Authentication works great! But I have huge problems getting the remember me functionality to work. After several hours I think I found the problem but I don't know how to solve it... Symfony2 seems to try to authenticate with the username instead of email in case of remember me. dev.log says the following: [2013-10-21 23:49:19] security.DEBUG: Remember-me cookie detected. [] [] [2013-10-21 23:49:19] doctrine.DEBUG: SELECT

Laravel 4 Remember me expire time

半腔热情 提交于 2019-11-29 02:49:54
问题 I am fairly new to Laravel and had a question regarding the remember me function. I have successfully enabled the "remember me" function by attaching a second argument to the Auth::attempt method like so. if (Auth::attempt(array('email' => $email, 'password' => $password), true)) { // The user is being remembered... } As noted in the documentation, this enables remember me indefinitely or until an user manually logs out. I essentially want to set an expire date on the "remember me" function.

Best practice for remember me feature [duplicate]

我的未来我决定 提交于 2019-11-28 23:54:47
This question already has an answer here: What is the best way to implement “remember me” for a website? [closed] 4 answers I am using 2 variables in cookie (7 day expiration) which is user id and hash. Hash is sha1 encode of user agent and user id. In this case some hacker can login who is know stolen cookie's browser. Which way should I follow or which practice is best for remember me security problems? While you can hash a user_id and secret_key, anyone who intercepts this cookie can log in to your application. In addition to this, you can make it so that your remember me cookies go stale

Create a symfony2 remember me cookie manually (FOSUserBundle)

牧云@^-^@ 提交于 2019-11-28 21:41:14
问题 Could somebody explain how you can manually create a remember me cookie in a controller? I want the users to stay logged in after they pressed the "register" button, without having to login with their credentials afterwards. I've tried to create a cookie manually but i'm guessing the cookie value is incorrect, and therefor the "remember me" functionality doesn't work. A cookie with the correct name gets set. I've checked that. The remember me functionality works as expected when using the

Remember Me functionality not working in Symfony2

只愿长相守 提交于 2019-11-28 21:32:03
I have implemented remember me functionality in Symfony2. When I log in with remember me box checked, cookie named "REMEMBERME" gets created. That cookie is also available if I close browser and open it after many hours. But when I load home page of my application, the cookie gets automatically deleted and I see no user logged in. Can anyone explain me the reason for cookie deletion? remember_me: key: qwerty lifetime: 604800 path: / domain: ~ This is my security.yml file section EDIT: I have still not found the solution to this question... EDIT2: Now got new problem. The REMEMBERME cookie does

Log user in with remember-me functionality in Spring 3.1

房东的猫 提交于 2019-11-28 17:57:35
I currently log users in programmatically (like when they login through Facebook or other means than using my login form) with: SecurityContextHolder.getContext().setAuthentication( new UsernamePasswordAuthenticationToken(user, "", authorities) ); What I want to do instead is log the user in as if they set the remember-me option on in the login form. So I'm guessing I need to use the RememberMeAuthenticationToken instead of the UsernamePasswordAuthenticationToken ? But what do I put for the key argument of the constructor? RememberMeAuthenticationToken(String key, Object principal, Collection<

“Remember Me On This Computer” - How Should It Work?

旧巷老猫 提交于 2019-11-28 16:26:25
问题 Looking at Gmail's cookies it's easy to see what's stored in the "remember me" cookie. The username/one-time-access-token. It could be implemented differently in cases where the username is secret, as well. But whatever... the thing is not very high security: you steal the cookie and you're ready to go. My question is on the functional side, however: when do you wipe their access tokens? If a user logs in without clicking "remember me" on another machine, should it invalidate their access