I will first explain my situation.
My first site is a Laravel running on lets say: mylaravelapp.com
Then I have installed a moodle (3.5) instance on: moodle.mylaravelapp.com
Now... What I want to achieve is to authenticate the users on both sites at the same time.
In the laravel application I have the user 'like sync' with Moodle. So, the user 'jhon' in Laravel application has an account on moodle under the same username, 'jhon'.
So, when the user gets into the laravel login form at mylaravelapp.com and complete his authentication user and pass I need to:
* Authenticate user in Laravel application (this is not the problem)
* Authenticate the user on Moodle (using the data retrieved from the Laravel application)
Then, once the user its authenticated in both sites he can go to one or another without the need of authenticate again.
After reading docs and forum topics I found the way of doing this like:
* Creating an authentication plugin and posting data from Laravel site to Moodle site. The problem faced here is that is not working for me ... ... If I directly post from the moodle site its work, if not it returns like authenticated html page but then when trying to access another page it takes me to the authentication page.
* Creating an auto submit form in a php script. I don't like this solution
First of all, sorry for my English, but is not my native language.
Second and last... I appreciate any help or tip.