I'm trying to authenticate my users (from my RN application) through the LDAP server (I've already found one to try authentication here, and it works!). I can create a custom token using Firebase every time I receive the credentials of the users (username and password) and save it in the Firebase real-time database.
The main problem is that I do not know how to connect my application with the LDAP server, I investigated and found that I have to install something like openLDAP or ldapjs but I do not understand how authentication has to be My guess is:
- User login in my RN application
- The RN application sends credentials to Firebase
- Firebase creates a custom token (uses the Firebase Functions to generate the custom token)
- Firebase returns the custom token to the RN application
- The RN application sends the token to the LDAP server (the server has predetermined users and passwords for testing)
- The LDAP server validates the token, therefore, authentication
- LDAP server returns attributes or "not found" to the RN application
- RN App grant / deny access to the app
Any help or advice will be well received, thanks :) Sorry for my bad english.