Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
You would do that from Express man. What kind of database are you using? have you any sort of user table in it? have you looked at pasport js?
-
drewbie8065y@AleCx04 I haven't. I didn't know where to start. I think I'll be using postgres as my db
-
Express is more than fine. You just need a database and an npm package to be able to communicate with it
The actual authentication is a lot harder based on what you want to do. The general flow is when someone logs in you create a token, put it into the database and give it to the client. This token is what authenticates them in the future
Make sure to always encrypt and salt passwords (I recommend bcrypt)
Some other things you might want to take a look at are JWT and CSRF attacks -
drewbie8065y@12bitfloat Thank you! I'll make sure to take a look. For some reason I thought I'd need more than Express.
I'm making some Animal Crossing website for fun . Haha.
How would I create user-profiles and user logins for my ReactJS app and Heroku? I've never done it before and not sure if ExpressJS is enough or even how to approach it.
question