Isn't OAuth already implemented as a plugin? https://github.com/glpi-project/plugins/blob/master/api/src/endpoints/OAuth.php
Customer support service by UserEcho
Isn't OAuth already implemented as a plugin? https://github.com/glpi-project/plugins/blob/master/api/src/endpoints/OAuth.php