0

I'm creating a e-commerce website with node and angular. I have made server with node, created api with all the endpoints, designed datebase. Fetching data and showing it with angular works.

But I have a problem with user authentication, I heard about Auth0 but problem is that I am storing users data (watchlist,shopping cart etc.) in my postgres datebase and I can't find any example how to get personal user data from my db with it.

Knight
  • 551
  • 1
  • 11
  • 24
  • You can't find an example of how to get data from a PostgreSQL database? If that's the case, then you haven't even tried. If it is something else, then try to clarify it. – vitaly-t Oct 07 '16 at 18:00
  • 1
    I know how to get data from db, like i said fetching public data works. But I dont know how to authorize user and get his PERSONAL data from server. For instance I have api endpoint "api/users/john221", so I want only user "John", after authorization, to be able to get his personal data at this endpoint. I can't grasp the concept of connecting authorization with getting personal data from my db. – Knight Oct 07 '16 at 18:10
  • 1
    By using Auth0 you don't have to worry about the authentication part so you then only need to ensure proper authorization rules. See [this answer](http://stackoverflow.com/a/39972660/204699) to a somewhat related question for reference. If you then have specific issues, update your question with the exact details. – João Angelo Oct 11 '16 at 09:22

0 Answers0