You should be able to achieve this using the Mendix OIDC module - https://docs.mendix.com/appstore/modules/oidc/
You'll need to register your app with Google and Facebook and there's a bit of configuration involved but both service providers have helpful documentation along with the Mendix documentation.