I have a "difficult" problem that i am not sure how should i approach it. Basically i have a mobile app, that has a server side (in Go) and the appropriate base (PSSQL). User can register via the standard procedures, via email, google, twitter etc and create a profile, and after that "use" the app(This is app B).
Now i have a totally different web application, that is written in php and has it owns database (MySQl)(let us call this App A).
My task is to allow user that has already profile on App A, to use that profile to login to my mobile application(App B). The right way to do this is with Oauth, however, i never worked on something like this before and it does not seem to be trivial. Another problem is that the app A is running on some old version of PHP and i have not worked with it before. The site is not much maintained anymore, i do not have experience with php and i am working on my own with this, so i can not consult with anyone to help me out.
So i am working into alternatives, to make this a bit easier but i can not find a good "alternative". I was thinking of something inline, if the user wants to login with his profile on site A, that i should first take him from the mobile app to my backend (both are App B), from there i should check if the provided information is valid on App A, and if it is true then i should create a new account on my App B for him. For subsequent login, i would then do the same principle just check if he already has an account here. But somehow this seems to be too simple and not the right way to do things. I should also mention that besides the login, the stuff that they can do on both app are totally different, they do not share any data between the applications.
Im sorry if this is the wrong site to ask, but im stuck on this and i would like to get some opinions. Here is a picture trying to explain the "architecture" but i am a terrible artist. Thanks for your help.