How can I use a custom value for the redirect_uri in the location header in a 302 response from auth0

This is kind of urgent and I’d really appreciate if someone can help with this. I’ve opened a support ticket as well.

Our application authenticates users with Auth0 using Github as the social Id provider.

The /authorize request to the auth0 tenant results in a 302 redirect to The value of location header in the 302 response contains url that contains a query parameter “redirect_url” which is always set to https://{auth0-tenant}

For example
https://github com/login/oauth/authorize?response_type=code&

I’d like to use another url that points to our backend server in the redirect_uri field. How can I change this value?

In the larger context, we would like to request another access token from github with additional scopes. But from Github’s standpoint, there can be only be one callback url ( We were hoping that we could change this url to our backend server. The backend would now receive all callbacks from github, and it would act only on callbacks used for requesting the access token with additional scope. For transactions involving user authentication, the backend would respond with a 302 and redirect the browser to so that login can happen normally.

the following response from Auth0 employee to an older question seems to imply that we are on the right track (i.e. we need to request second token with additional scopes). But we can’t do it unless we can redirect github to our backend.


Hi @vineetd,

I am going to leave this issue to the support team, so we don’t consume double the resources on the same issue.

I’ll post an update here when this is resolved in the support ticket.

This was resolved in a support case.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.