Is it possible to implement "Remember Me" using jquery cookies?
Asked Answered
P

1

9

Is it possible to implement "Remember Me" using jquery? If so, any suggestion how it can be done?

EDIT:

I am trying to remember username and password using jquery cookies.store cookies about username and password and read it the next time and redirect to a specific page.

Pyrostat answered 30/9, 2010 at 4:53 Comment(6)
More information please.Raptorial
why would you store username and password as cookies? can't it be any other variables?Jarib
@Reigel thats what i am asking suggestion how it can be done? Please suggest possible ways of doing it?Pyrostat
it depends on what are you trying to achieve. I see you want to redirect to a page, but is it necessary for you to use username and password? username might be okay, but I doubt with password. why not something like username and logged ? logged would be a boolean with value depending if the user is logged or not.Jarib
@Reigel logged holds a value True until the user logs out. Is that what you are trying to say?Pyrostat
But what if the user faked the cookie to have value of True for logged. He can login without password.Airframe
R
3

Look at this:

jQuery Cookie Plugin

How to implement:

Rohn answered 30/9, 2010 at 5:4 Comment(5)
@Rohn this isn't an answer what i was looking for. I know this plugin but i want suggestions to implement "Remember Me" using this jquery cookie plugin.Pyrostat
@Pandiya Chendur: I have added a tutorial to implement this.Rohn
@Reigel i ve removed -1. But this answer uses password as cookie value. Is that secure?Pyrostat
I'm not really sure about security. But why would I put that on the risk. Well, that tutorial is the way to go. Use other variables as you like. You can use password if you really want to. I just don't suggest it. logged holds a value True until the user logs out. is what i'm suggesting.Jarib
May be this thread will help to understand cookie security: #2100856Rohn

© 2022 - 2024 — McMap. All rights reserved.