ocsecosticketforum
Let me explain something beforehand so you know how OAuth2 works in our system. With Users (clients) if they were to login via OAuth2 and the authentication was successful and they do not exist in osTicket yet, the system will auto-register them as a User. With Agents on the other hand, if they do not exist yet they will be denied - sometimes they stay on Staff Login Page other times it kicks them back to the Landing Page. They are denied because Agents have access to the backend plus they need Department access, permissions, etc. configured before they are functional. Now with both Users and Agents if the OAuth2 login was successful the provider will redirect back to osTicket with a response that contains the user's information (the attributes containing email, username, etc.). We then parse that response, grab the needed attribute values (identifying attributes are configurable within the plugin), and attempt to match the User/Agent based on the values. If no match is found we auto-create Users or deny Agents.
Now, I'm assuming you are logging in as an Agent in your screenshots above. If you login via OAuth2 as an Agent and you get kicked back to the Landing Page that means either you don't exist yet in osTicket, the attributes are wrong so it's not matching the email/username correctly, the username/email in osTicket doesn't match what's in your provider, or the plugin has something misconfigured. It would be best to contact your provider to see what the correct OAuth2 information to use is. Once you confirm that's 100% correct you need to debug the osTicket code to see what's going on. Typically, these issues are attribute related or configuration related but never count anything out.
Also, I noticed you said you are using v1.18.1 but I HIGHLY recommend that you upgrade to v1.18.2 and install the latest build of the OAuth2 plugin to ensure this issue isn't related to a bug that's already been addressed. Also, you are behind important security updates.
Cheers.