Auth0 Authentication Integration with Existing User Database

I have a requirement to integrate Auth0 into our project (Reactjs / Hapijs / MySQL). I checked the documentation and they have a lot of examples, and this is great, however I can not find any relation to how I use the existing user database.

In my application, I have users, and these users can have one or more projects. Using the authorization that we currently use, the user logs in, I check what projects he has and sends it to the React application.

I am missing a document that explains to me how to use Auth0 and still be able to check in my database which projects belong to the user.

My idea of ​​how this should work (maybe I'm wrong):

  • User sends username and password to our server
  • Our server makes an Auth0 request (with credentials provided)
  • Auth0 responds to our server with a token
  • We look at the users table in our database and try to verify the existence of this user.
  • If this is a match, we just look (as we already do) for custom projects.

Is this the way it should work?

+4
source share
1 answer

There are several scenarios in which you want to integrate Auth0 with applications that already have existing user databases. You can:

  • Auth0.

, , , , . , , , . . MySQL, , , .

:

  • Auth0 (Lock), , .
  • , Auth0
  • API Auth0 , , ( )
  • , API , , , - , .

, , , :

  • script ( , ) ()
  • script
  • script
  • script
  • script

, Auth0, , . script, , , , , .

+3

Source: https://habr.com/ru/post/1658060/


All Articles