Implement a "Remember me" CheckBox in windows application?
Asked Answered
L

1

2

Hello I am creating a Windows application (WPF) that is going to be running in few stations accessing 1 database.

I already implemented a login form with a login system thru My.User.CurrentPrincipal. Now, I want to implement a "Remember me on this computer" check box in the login form, where should I store the value?

Should it be a cookie? a .settings value? or what good other suggestion do you have.

Update
Also what data (i.e. what value) shoud I store, I want it to be secure, that users should not be able to copy the values etc.

Thanks in advance!

Lajoie answered 4/11, 2009 at 9:43 Comment(3)
Would you want a TTL (time to live) for the "remember me" functionality? Should the program ask them to re-enter user name and password after a predetermined amount of time? Scenario - User logs in with Remember Me set to true and a TTL of 2 days. They can open and close app without being prompted to log in for that time period, but, after that, they will be prompted to log in again.Taboo
Putting together an answer/ code sample that I think will work for you.Taboo
But this is not the problem since I if there is going to be a sliding ttl, it's going to be preset in the application settings. So I will store the expirration (or creation) date along with the username to automatically login to. The question was what resource to use (i.e. registry etc.)Lajoie
L
1

I think you would probably want to store in the registry and i dont think u have cookies in desktop apps.

Laurustinus answered 4/11, 2009 at 9:46 Comment(3)
You can also use the local application data directory.Odo
1) What values should I store? 2) Consider putting it in your question body.Lajoie
Look up registry manipulation in ur respective language in google and you will find tonnes of examples. As for what values , i guess you can encrypt and store the username and password.Laurustinus

© 2022 - 2024 — McMap. All rights reserved.