2
drewbie
4y

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.

Comments
  • 0
    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?
  • 0
    @AleCx04 I haven't. I didn't know where to start. I think I'll be using postgres as my db
  • 0
    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
  • 1
    @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.
  • 1
    If you dont wanna fuck around with login stuff, just use firebase for that
Add Comment