Hi everyone and thank you in advance for reading the question and helping me out.
I amb building with a friend an app that uses a custom self-made PHP-MySQL API to be cross-platform. Everything in the app works thanks to that API but we need users to be controlled by an external WP. WP and API are in different sub-domains and servers.
So we have: WP (for users) + API (for functionalities and data) + Apps (UIs).
Users write it's credentials in the App and that credentials go to our own API and here is where I doubt how should I use those credentials to log in into WP. The same happends to register. Those two functionalities need to be handled by WP and I don't know which of this 2 options is best:
Option 1: Create another mini-api for WP with wp_create_user() and others needed and call from the main API to the mini-api for WP to regiser / login
Option 2: Use WP Rest API to authenticate and register. The problem with that option is that all the examples that I have seen were web-based and I need to implement it with no grafic interfice to call it from my PHP API.
Response needed: In any case the only answer I need from WP is the wp_user id.
PD: Sorry for my poor english, it's not my native language