Facing issue in login while connecting with Google

Hi Peter sir, hope this message finds you well. I just wanted to ask for help. I am creating a MERN web App, where I am using login system through Auth0. While clicking login and choosing account I am getting an error page, Don’t know why this is happening. I have written almost exact code what tutorial has and still facing this error from last 2 days. I am attaching that error page which is coming after choosing google account. Can you please help me with this issue would really appreciate your efforts. Thanks for your time


Hi @sultan.mohd2023 :wave:

Thanks for reaching out! :sunglasses:

Typically, clicking on See details for this error will yield additional information that will be displayed in the browser that can provide further inshight. And, of course, delving into the log events via the Auth0 Dashboard (see here for more information) is another great option too.

:thinking: However, I can see from the console trace in the second screenshot you provided that it looks like a 500 (Internal Server Error) is being returned from the call to /authorize. This is almost always a sign that some Auth0 custom extensibility is failing in a way that’s not being handled correctly - typically, either a Rule or a Hook or perhaps a Custom Database Connection that you’ve created is generating an uncaught exception of some kind. It could even be something from an Action, though exception handling here tends to be a lot more resilient :sunglasses:

So can I ask you to ensure you have disabled all of the custom extensibility that you’ve created and then try again? That way, you can rule out all custom extensibility points and then re-enable each one individually until you find the one that’s causing you the issue.

Hope that helps :hugs:

1 Like

Hi @peter.fernandez , first of all thank you so much for replying me as I was facing this issue since from a week and here I have asked 2-3 times via creating post but no one helped and hope you will solve this issue.

I am attaching Screenshot of that see details thing.
And about that Auth0 custom extensibility thing, can you tell me how can I check this and make sure that everything is disabled correctly

Always happy to be of help @sultan.mohd2023 :grinning: In future, I would definitely recommend the Post route vs a DM though, as it means others will be able to assist, and also everyone gets to benefit from the answer :sunglasses: By all means feel free to add a specific mention to the post, but if the person mentioned specifically isn’t available for whatever reason it should mean you’ll get to a resolution in a timely fashion :tada:

And about that Auth0 custom extensibility thing, can you tell me how can I check this and make sure that everything is disabled correctly

The best way to do this is to follow the Auth0 Docs by using each of the (extensibility) links I shared previously; there isn’t once central location for disabling all Auth0 extensibility, unfortunately. I’d also double-check that you don’t have any Auth0 Extensions enabled either (which might be causing an issue).

:thinking: In fact, I’ll go ahead and move this thread to the public help form so that if anyone else has any thoughts that might help they can share them too :sunglasses:

Sir @peter.fernandez Initially I created 2 public posts and when I didn’t get any response for 2 days then I thought of messaging staff personally :slight_smile: .
I understood that I’d to follow docs but how can I disable them like should I do it in my code? or I have to do it in Auth0 dashboard?
And what about that Screenshot? Did it helped you to understand problem?

Understood, and I’m sorry to hear it’s taken a while to get a response. As a community forum, we do our best to answer folks as quickly as possible but there isn’t an SLA like you’d get with Auth0 Support. I do appreciate you reaching out to me directly and hopefully we can get you back on track :hugs:

I understood that I’d to follow docs but how can I disable them like should I do it in my code? or I have to do it in Auth0 dashboard?

Auth0 extensibility is all run on the Auth0 platform, so you should be disabling it via the Auth0 Dashboard. You should not need to modify your code :sunglasses:

And what about that Screenshot? Did it helped you to understand problem?

It was helpful in supporting the current notion that the problem is related to some unhandled exception within custom extensibility. So let’s continue down that path for the moment. And if you also take a look at the Auth0 Logs (see here for details) you should see an error that corresponds to the server_error shown :slightly_smiling_face:

Hi @peter.fernandez , I tried to do what you said and I couldn’t find any extensions that I’ve enabled and still I am facing this issue.
And when I am checking logs then the decription is showing this message " * Description
Unable to issue redirect for OAuth 2.0 transaction"
I am attaching the details here for you so that you can I have a look into it `{

Thanks for the feedback @sultan.mohd2023 :slightly_smiling_face: So, just to confirm, no custom Rules, custom Hooks, custom Actions, Custom Database Connections nor Extensions are enabled. Correct?

And when I am checking logs then the decription is showing this message " * Description
Unable to issue redirect for OAuth 2.0 transaction"

:thinking: Looking through some of the other posts here on the Community forum I came across Possible causes for "Unable to issue redirect for OAuth 2.0 transaction"? and Help: server_error: Unable to issue redirect for OAuth 2.0 transaction which seem to suggest a similar problem to the one you’re facing. Can you take a look at these and see if one, or the other, fixes your issue? If not, then we’ll continue the investigation. But if it does, I’d be very much interested in hearing what the issue was in your specific case. Thank you :sunglasses:

I am attaching the details here for you so that you can I have a look into it

Providing details from the Auth0 log is always a valuable diagnostic aid. Thank you. For future reference, one of the recommended best practices is to redact any information that could be of a (security) sensitive nature - especially when shared in a public forum. Auth0 will always automatically redact things like passwords or secrets, but sharing things like an email address and or audience should also be avoided - the former being a potential for PII leakage, whilst the latter provides information that could potentially be useful to a bad actor. Naturally, information like an email address or audience is provided by Auth0 to help diagnose any issues, so the onus on redacting this is on the person who shares those details.

Hi @peter.fernandez , yes I have checked again and no custom Rules, hooks, actions, database connections and extensions are enabled.
And I’ve also checked these 2 posts and there is nothing there in these posts which can help me.
I know sir it’s your job to resolve the issue and I appreciate your efforts but trust me it’s been 8 days I am scratching my hairs with this problem, pls provide solution to this ASAP and again appreciate your dedication.
Thank you

Ok. Let’s dig into this in more detail :sunglasses: I appreciate that it can be frustrating when things don’t work as planned, but debugging is all about initially eliminating the obvious and then narrowing down on the specifics of the problem. Both of those are especially important when one is trying got do that remotely :smiley:

I am creating a MERN web App, where I am using login system through Auth0. While clicking login and choosing account I am getting an error page, Don’t know why this is happening. I have written almost exact code what tutorial has and still facing this error from last 2 days.

Firstly, can you share a link to the tutorial to which you’re referring?

Secondly, can you confirm whether the issue you’re experiencing is a result of integrating with the Auth0 front-end React SDK or the Express backend? In fact, if you are able to share the code you’ve written - always remembering to redact any security sensitive information - then that would be great. Thank you.

Hi @peter.fernandez sir, thanks sir I know you know the correct way to debug such errors and I appreciate your work.
Here is the link of the tutorial and switch your time stamp to 1:28:00 to get to that specific auth0 path- https://youtu.be/ardeKHEN1j4?si=oTZvgySM3VHbDcyA
And about the issue, I am experiencing it in Frontend side as of own you can see it from tutorial as he’s also creating frontend.
And about the code, I have uploaded that code in a public repository sir, if you want I can add you to that repository so that you can inspect it(If you want then pls drop your github username and I’ll add you there as a collaborator). Lastly thanks for your efforts sir.

Thanks for the prompt reply in providing the requested information @sultan.mohd2023 :sunglasses:

Here is the link of the tutorial and switch your time stamp to 1:28:00 to get to that specific auth0 path- https://youtu.be/ardeKHEN1j4?si=oTZvgySM3VHbDcyA

:thinking: So this does not appear to be an official Auth0 tutorial. Whilst we try our very best to ensure that the quality and accuracy of the official guidance we provide is as high as possible, we sadly can’t control the quality nor accuracy of third-party guidance. Have you tried reaching out to the author of that tutorial directly to discuss the issue you’re facing? Perhaps he is able to shed some further light on the problem you’re facing.

Having said that, let me see if there are some diagnostic suggestions I can give that might be helpful based on the evidence available. From the various descriptions of the “Unable to issue redirect for OAuth 2.0 transaction” - both in the Auth0 log info you shared and in the other Auth0 Community forum posts I shared, it suggests that the redirect_uri parameter you’re supplying is likely invalid. Based on the code in the tutorial, have you tried any of the following (in no particular order):

  • Confirming that the error condition unable to initialise auth is not thrown in the browser?
  • Confirming that the value of import.meta.env.VITE_AUTH0_CALLBACK_URL is accurate?
    • You could simply console.log this to the browser as the easiest option.
    • You might also want to check out the latest Vite documentation here for information on environment variable usage within Vite
  • Directly specifying the redirect_uri value as something explicit - e.g. http://localhost:3000 (or wherever your app is running). Or alternatively, use something like window.location.origin, as described in our official Auth0 Reack SDK docs (here).

Hii @peter.fernandez sir, I have tried everything that you’re saying that’s why I contacted you after that and about that tutorial I tried to find where he can help me with it but unfortunately there is anything where he can help me. That’s why I am here

:thinking: If you’ve tried the recommendations suggested, then the next thing is to confirm what’s being sent to Auth0. If the interaction with Auth0 is from the front end, you should be able to generate a HAR file via the browser that will contain the necessary information. Here is the link to our Docs page that will tell you how to do this: Generate and Analyze HAR Files. Once you have the HAR file and have followed the best practices regarding the removal/obfuscation of sensitive data, feel free to share it (the HAR file), and I’ll take a look at it to see what might be going on :sunglasses:

Sir I am getting confused and don’t think this issue is that big for you. I am feeling helpless. You’re saying do this, then this, then this. What should I do? I am not getting a clear picture?

Thanks for the feedback @sultan.mohd2023.

I can totally appreciate that this is a frustrating situation for you. And I can appreciate that the diagnosis of your problem sounds like a complex bunch of seemingly random asks/questions.

However, there is a pattern to the suggestions I’m making. And that pattern is primarily to get as much information as we can - hence the above ask for the HAR file. Without further information about what is going on in your environment - on your machine as well as in your code - all that we can do is speculate.

And about the code, I have uploaded that code in a public repository sir, if you want I can add you to that repository so that you can inspect it(If you want then pls drop your github username and I’ll add you there as a collaborator).

If it’s a public repo then feel free to DM me the link and I can take a quick look; we typically don’t share GitHub details directly, nor do we perform in-depth code analysis outside of our Professional Service engagements. Alternatively, you can open up a support ticket at https://support.auth0.com/ and one of our support engineers may be able to help; there will likely be a charge for that, but it will depend on whether you currently have a contract with Auth0 or not.

One last thing I can share which may address your issue is this: Unable to issue redirect for OAuth 2.0 transaction · Issue #1050 · auth0/auth0-spa-js · GitHub. That issue discusses something similar to what you’re seeing so it may provide a resolution :sunglasses:

Alternatively, if you’re happy to share the code here then please feel free - that way the community will be able to help as a whole :smiley: Naturally, please redact anything of a security and/or sensitive nature before sharing. Thank you :sunglasses: