I have burnt up days on trying to get Oauth2 working. Everything is configured as should and at some point I do get an successful auth but only of I give the stupid account global admin rights. I revoke the global admin and make it a regular account and it all fails again. I should not have to give this account super privs to make this crap work. Now my latest error at which I have NO idea how to solve because I don't understand how it can be that for a finished product that I am getting an API call error.
[15-Oct-2022 23:16:09 UTC] PHP Fatal error: Uncaught Error: Call to a member function setConfigClass() on null in phar://C:/inetpub/osTicket/base/include/plugins/auth-oauth2.phar/oauth2.php:592
Stack trace:
#0 C:\inetpub\osTicket\base\include\class.email.php(675): GenericEmailOauth2Provider->getPluginInstance()
#1 C:\inetpub\osTicket\base\include\ajax.email.php(26): EmailAccount->saveAuth()
#2 C:\inetpub\osTicket\base\include\class.dispatcher.php(151): EmailAjaxAPI->configureAuth()
#3 C:\inetpub\osTicket\base\include\class.dispatcher.php(38): UrlMatcher->dispatch()
#4 C:\inetpub\osTicket\base\include\class.dispatcher.php(120): Dispatcher->resolve()
#5 C:\inetpub\osTicket\base\include\class.dispatcher.php(38): UrlMatcher->dispatch()
#6 C:\inetpub\osTicket\base\scp\ajax.php(326): Dispatcher->resolve()
#7 {main}
thrown in phar://C:/inetpub/osTicket/base/include/plugins/auth-oauth2.phar/oauth2.php on line 592