Custom domain not working with social login

Hi, im trying login with social login with custom oauth2. I can login with domain but with custom domain is return access_denied “The authorization server encountered an unexpected condition that prevented it from fulfilling the request”. How can i login with custom domain? Thanks a lot