I’m not quite at the full stack projects (like the voting app), but I was thinking about them, and had a question on the structure for them. What is the best way to handle personal logins? I can see how you could get all the voting data off a MongoDB, but I’m not quite sure how an account login is structured to save personal data
normally you would use a function to encrypt the password when the user creates the account and only the hashed password is stored in the db. so when the user logs on it hashes that and compares it to whats stored in the table. you can use node.js for encryption and mongoDB for storing it.
hope this answers your question.
@mcockrell1 sorry, what I meant was is what is the structure of which the account information is stored? Like for instance, if my app brings you directly to the login screen, and then the user logs in, once logged in, where should the app redirect? Should there be unique URL’s for every user, if so how?
im not sure if this helps because i dont really know how its done on this site. but in the real world you would create the basic page and after they entered credentials it would pull the relevant info based on the user account to populate the fields. some languages are better for this than others. for example in php it would dynamically create either part of the page or the entire page if you wanted it to. i would suppose as far this site goes it probably uses some type of package to accomplish this. so basically the app would redirect to a page template and then use the credentials to pull settings from a DB, and use those settings to populate the hmtl/css of the template page.
i hope this isnt confusing you.
The way I handled logins was to redirect to a general /home page. The homepage would be sent the details of the user that had logged in after it mounted (this was done in React).