![moodle umt moodle umt](https://blogs.uni-due.de/das_zim/files/2013/10/moodle4.png)
![moodle umt moodle umt](https://zetti.nl/wp-content/uploads/2020/05/moodle-gratis.jpg)
What is the best route to accomplish this? I am currently attempting to write an authentication plugin but I want to verify that I'm on the right track and learn some more about the functions I will need to implement to make it work. Instead, it should display the default Moodle login page and allow normal Moodle logins. One extra catch: if a specific query parameter is passed when accessing Moodle, it should not attempt to sign in automatically. We currently have the OAuth2 services enabled to allow the user to log in with their account by selecting the alternative login options ("Log in using your account on"), but we would like to bypass this extra button click while preserving its current behavior (if the user is signed in on our system, they will be signed in on Moodle if they are not signed in, they are redirected to our login page, they can sign in, and then be redirected back to Moodle as a logged-in user). I am very, very new to Moodle development and have been given a task to implement single sign on between my company's system and our Moodle server using OAuth2.