Unable to return to my app after e-mail verification

Hi. I’ve setup a very simple single page app (actually an index.html file with the contents of the javascript Login demo), served by nginx and hosted in a docker container on my Linux desktop. The app listens to a name linked to a (private) address in the form of:

https://mormotclient.ddev.site

In my auth0 app configuration page, I’ve entered in the Application Login URI field the following url:

https://mormotclient.ddev.site/login

I’ve also configured the nginx, so to redirect the above url to (mytenant corresponds to my tenant id):

https://mytenant.eu.auth0.com/authorize

Login and logout works as expected, using so far database user accounts. The problem is that whenever I confirm an user’s e-mail and press the “Back to my app” button, I get the following error:

server_error : Unable to issue redirect for OAuth 2.0 transaction

The corresponding error log contains (personal info has been replaced by …):

{
“date”: “2021-03-05T11:07:39.665Z”,
“type”: “f”,
“description”: “Unable to issue redirect for OAuth 2.0 transaction”,
“connection_id”: “”,
“client_id”: “…”,
“client_name”: “My single page app”,
“ip”: “…”,
“user_agent”: “Chrome 89.0.4389 / Linux 0.0.0”,
“details”: {
“body”: {},
“qs”: {
“client_id”: “…”,
“response_type”: “token”,
“iss”: “https://mytenant.eu.auth0.com/
},
“error”: {
“message”: “Unable to issue redirect for OAuth 2.0 transaction”,
“oauthError”: “server_error”,
“type”: “oauth-authorization”
},
“session_id”: “RiwmwJV6UQEPdmUlBqhYEeNUmp22oiew”
},
“hostname”: “mytenant.eu.auth0.com”,
“user_id”: “auth0|…”,
“user_name”: “…”,
“audience”: “https://mytenant.eu.auth0.com/userinfo”,
“scope”: ,
“log_id”: “90020210305110743351000681376438783193575614740051263522”,
“_id”: “90020210305110743351000681376438783193575614740051263522”,
“isMobile”: false
}

I appreciate very much any help… :slightly_smiling_face:

Hi @damian.d940

This error occurs when after the authentication there is no defined URL to return to. Can you check that you have set a redirect_uri in your authentication request? It should be visible in the /authorize request as something like:

https://mytenant.eu.auth0.com/authorize?response_type=XXXX&client_id=XXXXXXXXX&scope=XXXX&state=XXXX&redirect_uri= https%3A%2F%2Fyourapp.com%2Fcallback

Regarding the email verification, you can always specify a result_url if you’re using a verification ticket, as shown here:

Hello @ricardo.batista

Thank you very much. When I added redirect_uri to the query parameters of the redirect rule to /authorize endpoint the problem solved.

1 Like

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