Custom social connection throws "Exceeded maxRedirects"


We are trying to set up an authorization server with custom social connection in auth0. Getting authorization code and access token seems to work fine. Problem starts when fetch profile script tries to call the endpoint to fetch user information. As soon as request is sent, it throws error “Exceeded maxRedirects. Probably stuck in a redirect loop {userInfo endpoint here}”. Endpoint doesn’t have any redirects and it seems to be working fine when sending request from Postman.


There actually is unintended redirect in the endpoint…