How to start implementing my own OIDC?

I have raised previous questions about the sugar login process. After deliberations I come to the decision that I have to implement my own OIDC. My company has an identity server. So to clarify we are ON PREMISE and we have our own identity server, we do not want to connect through azure or google or okta.

How would I start the entire project? How to make sugar listen to an endpoint for the Bearer token instead of displaying the usual username + password form? What would be the first steps to implement my own single sign on using Open Id Connect and Oauth 2.0