Hi, I have gotten a library that has worked for me, it is quite complete, I will leave it here.

https://github.com/jumbojett/OpenID-Connect-PHP