I want to implement a login into my C++ desktop application and I'm having a hard time finding information on managing login sessions without cookies or JWT (JSON Web Token) (more on that in a bit). I can send HTTP requests from my C++ app just fine as well as incorporate TCP sockets if needed.
Here's a typical user workflow:
- Register for an account on my website.
- Pay for access to a desktop application.
- Download and log in to the desktop application.
- Desktop application sends data (~1MB) to server API to be processed.
- If the user is authenticated and has sufficient funds, processed data is returned.
- Session storage so users don't have to log in every time.
- Close all other sessions if a log in occurs from a different IP.
- Ability to log in to the website to view usage stats and edit account info.
Almost every guide or tutorial I've found online for MERN (Mongo, Express, React and NodeJS) stack authentication and session handling involves either tokens or cookies. I want to use neither.
How would I begin to implement server-side sessions management and user authentication inside a Node app when the log in can happen from a browser OR a desktop application?
Thanks for your time!