I am making a simple application that runs on command prompt/terminal. (Sounds really bad, but I’m really invested in this.)
I was wondering when you click the “Login” button, it’ll show them a prompt to login with the credentials given to them (by me). Thanks!
Could you clarify? I assume you’re asking how to make a modal window in the terminal.
Moved this to coding help to get you more attention.
There are several ways to do terminal logins.
My favorite of them is using SSH keys (private/public keys). This is however really advanced in some cases.
You can also use the default username/password strategy.
Or really any way you can imagine that they can prove themselves to be who they say they are.
If you want to build a terminal interface I recommend you look into a module called Blessed.js. Or if you’d like to keep it simple you can look into Inquirer.js.
You could also use a working terminal emulator like weTTy, which is what Glitch uses.
Thank you! I found inquirer.js really helpful.
Do you have documentation/videos talking about SSH keys?
I really don’t have any tutorials as I learned this myself using the Node.js API docs for their Crypto module. And I recommend against trying to learn it yourself as a beginner, as this is some pretty difficult stuff.
However, if you insist I’m sure you could google something like Node.js public private key authentication