Results 1 to 4 of 4

Thread: Best Way To Implement "Remember Me" Feature?

  1. #1
    Join Date
    Oct 2012
    Posts
    13
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Best Way To Implement "Remember Me" Feature?

    Hello!

    First post here! I'm hoping maybe you could help me with a few suggestions. I'm making a login for my client application, but I want to implement a feature to remember the users credentials. This feature would require that the client automatically fill in the users username and password. I could store it in a text file and simply read it when the application launches, but I was hoping maybe there was a better way. This application will primarily run on Windows.

    Thanks!

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: Best Way To Implement "Remember Me" Feature?

    QSettings is designed to hold small pieces of configuration information like this.

    With passwords you generally have the added requirement to encrypt the data before storage. Depending on security requirements this encryption could range from none through to full strength encryption (AES for example). You need a reversible encryption to allow recovery of the password for the third-party system (that means embedding some sort of key into your program: a security weakness). There is nothing in Qt that does this part for you.

  3. #3
    Join Date
    Oct 2012
    Posts
    13
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default [SOLVED] Best Way To Implement "Remember Me" Feature?

    Quote Originally Posted by ChrisW67 View Post
    QSettings is designed to hold small pieces of configuration information like this.

    With passwords you generally have the added requirement to encrypt the data before storage. Depending on security requirements this encryption could range from none through to full strength encryption (AES for example). You need a reversible encryption to allow recovery of the password for the third-party system (that means embedding some sort of key into your program: a security weakness). There is nothing in Qt that does this part for you.
    Chris,

    Thanks for your response. I have implemented it as a QSettings feature and encrypted the password using SimpleCrypt. As the documentation states, it's far from the perfect solution, but it clears up the problem of storing the password in clear text (plus it's stupid easy to implement).

    Thanks again!

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: [SOLVED] Best Way To Implement "Remember Me" Feature?

    Quote Originally Posted by xyz247 View Post
    encrypted the password using SimpleCrypt. As the documentation states, it's far from the perfect solution, but it clears up the problem of storing the password in clear text (plus it's stupid easy to implement).
    Instead of that "encryption" you can as well use QByteArray::toBase64(). It provides a similar level of "security" as this SimpleCrypt stuff without claiming to be encryption.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Add "Check for updates" feature
    By jiveaxe in forum Qt Programming
    Replies: 20
    Last Post: 19th September 2008, 16:39
  2. Eclipse "Remember my decision" Problem
    By brent99 in forum General Discussion
    Replies: 0
    Last Post: 13th July 2008, 20:11
  3. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 19:05
  4. Using the "pixmap function" feature
    By Michiel in forum Qt Tools
    Replies: 8
    Last Post: 24th May 2007, 14:55

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.