Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. log in system backend.
Qt 6.11 is out! See what's new in the release blog

log in system backend.

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 114 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    imanipourmeysa
    wrote last edited by imanipourmeysa
    #1

    Hi everyone,
    I am trying to make a Qt inventory application project for learning purpose.
    I recently learned some basic of Qt (core and widget) and I have c++ background.
    I have a question about the application design specifically regarding the sign-in part.

    I want to user to be able to sign-in based on username, and password.
    so at first, I thought that I can make a create account form which gets the username and password in a QMap container, and later I use that QMap to check if they are correctly filled to allow log-in in the inventory application dashboard.

    However, I am new to software development and I want to know in real world application what should I do rather than using QMap.
    I know I should not use file to store the username, and password in a file.
    what do you suggest.
    is the SQL the right choice, or not.
    later each user (with specific username, and password), can have access to their specific inventory application and their own specific database.

    Thanks a lot for your guide and feedback.

    Pl45m4P 1 Reply Last reply
    0
    • I imanipourmeysa

      Hi everyone,
      I am trying to make a Qt inventory application project for learning purpose.
      I recently learned some basic of Qt (core and widget) and I have c++ background.
      I have a question about the application design specifically regarding the sign-in part.

      I want to user to be able to sign-in based on username, and password.
      so at first, I thought that I can make a create account form which gets the username and password in a QMap container, and later I use that QMap to check if they are correctly filled to allow log-in in the inventory application dashboard.

      However, I am new to software development and I want to know in real world application what should I do rather than using QMap.
      I know I should not use file to store the username, and password in a file.
      what do you suggest.
      is the SQL the right choice, or not.
      later each user (with specific username, and password), can have access to their specific inventory application and their own specific database.

      Thanks a lot for your guide and feedback.

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote last edited by Pl45m4
      #2

      @imanipourmeysa

      Hi,

      yes, a login dialog is reasonable. There you can use a QLineEdit with its Password mode to display input as dots.

      I know I should not use file to store the username, and password in a file.

      You can. On e.g. Linux everything is a file ;-)
      But of course you should not store it as plaintext
      Use for example QCryptograhicHash and hash the input in the same way using the same algo.
      Store the hash in an SQL DB (using the QSQL Module)

      • https://doc.qt.io/qt-6/qcryptographichash.html

      Edit:

      The hash algos in QCrytographicHash are not very safe for passwords, at least not for actual SOTA security.
      You can still use it in your project to prove the point and to have some security.
      For actual passwords you need something like Argon (available via thirdparty lib) which adds salt to your key and is AFAIK slow to make brute forcing attacks harder.


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      I 1 Reply Last reply
      2
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote last edited by
        #3

        Hi,

        Some details are missing:

        • Are you writing both the client and the server with Qt ?
        • Do you already have the backend working ?

        If you want to do both with Qt, then I would recommend checking the cutelyst project for the backend part.

        If you want to broaden your knowledge, then maybe something like Django, which is in Python, for the backend part might simplify your life for getting started as all the users/password management is included there.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        I 1 Reply Last reply
        0
        • Pl45m4P Pl45m4

          @imanipourmeysa

          Hi,

          yes, a login dialog is reasonable. There you can use a QLineEdit with its Password mode to display input as dots.

          I know I should not use file to store the username, and password in a file.

          You can. On e.g. Linux everything is a file ;-)
          But of course you should not store it as plaintext
          Use for example QCryptograhicHash and hash the input in the same way using the same algo.
          Store the hash in an SQL DB (using the QSQL Module)

          • https://doc.qt.io/qt-6/qcryptographichash.html

          Edit:

          The hash algos in QCrytographicHash are not very safe for passwords, at least not for actual SOTA security.
          You can still use it in your project to prove the point and to have some security.
          For actual passwords you need something like Argon (available via thirdparty lib) which adds salt to your key and is AFAIK slow to make brute forcing attacks harder.

          I Offline
          I Offline
          imanipourmeysa
          wrote last edited by
          #4

          @Pl45m4
          Thank you for the advices.

          1 Reply Last reply
          0
          • SGaistS SGaist

            Hi,

            Some details are missing:

            • Are you writing both the client and the server with Qt ?
            • Do you already have the backend working ?

            If you want to do both with Qt, then I would recommend checking the cutelyst project for the backend part.

            If you want to broaden your knowledge, then maybe something like Django, which is in Python, for the backend part might simplify your life for getting started as all the users/password management is included there.

            I Offline
            I Offline
            imanipourmeysa
            wrote last edited by
            #5

            Hi,

            My purpose is to learn Qt, and I considered this project (inventory management app) to do in Qt.
            However, it comes to my mind, that I even may not need a log-in system.
            If I am developing a desktop application (not a web app), then I may not need to have log in.
            I am trying to do an application, as portfolio and learning purpose, so I can get a job in C++/Qt, and I considered this project.

            thanks for your responses, they guided me.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote last edited by
              #6

              I am fully aware that you are developing a desktop application. This does not mean it should not access a remote service.
              If you want to build your skills, I would consider not dumping that part. Implement it in a later stage but don't drop it.
              Typically an inventory application will make use a of centralized storage so that all users can access the same information.
              You can either do it using a database or a web service in front of a database.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved