Hi,
A nice starting point is the next module: https://marketplace.mendix.com/link/component/120691
together with the documentation you should be able to implement Oauth 2.
Cheers,
Javier
If your IDP supports OpenID Connect (OIDC) you may want to consider this one:
https://marketplace.mendix.com/link/component/120371
OIDC is an extension to OAuth. Most IDP’s (i.e. Azure AD, Okta) do support OIDC for SSO.