New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Always "Invalid state" in v1.2 #186
Comments
I'm seeing the same issue. |
I just ran our default react quick start (with an updated version of the SDK) and it worked. Can you please try this to see if it works with you as well? https://auth0.com/docs/quickstart/spa/react/01-login?download=true |
I can confirm that we are having the same problem. Might it have something to do with being in a legacy tenant plan? We are using two tenants, one with a new free plan, one with a legacy plan. With the legacy plan, we are getting the error. The new tenant works. Just a thought. Have tried many other different things, none have helped, yet. We have an angular 8 application, using an integration approach similar to your quickstart. Up until 1.1.1 we did not have any major issues. I can also confirm that downgrading to 1.1.1 makes everything work again :) |
@luisrudge The React quick start works for me as well with v1.2.2. Here's how I'm creating the client, if it helps: createAuth0Client({
audience: 'http://localhost:3000',
client_id: 'BmQe...',
domain: '{my-development-domain}.auth0.com',
redirect_uri: `${window.location.origin}/login/callback`
}) |
Some more information: We are also getting Invalid State errors like this with version 1.1.1, but only with a few clients and not all the time, which is very weird:
The errors also sometimes come paired with the following, leading to a breakdown of the whole login-flow on some browsers and platforms, but working in others:
From the logs it seems that we have been having this problem since migrating to the new auth0-spa-js library. No entries like that before. I am not sure if this is related, but it certainly smells like a very very similar problem. |
@Schmaga I tested the react quickstart with an old tenant and with a new one as well, both work 🤔 do you have any rules running in any of the tenants? @Schmaga we had some conversations about the second error you're having: #70 (comment) - The first one is pretty weird though! @jstayton @Schmaga Can you please send a HAR file of the failed attempt to luis.rudge@auth0.com? I'll take a look ASAP. |
@luisrudge it's happening to me with an angular 8 app. It works fine using a non prod build but as soon as the --prod flag is added to the build the invalid state bug appears. |
@wdrobinson perfect. Let me try that. |
@wdrobinson
And this works as expected, no state errors. Can you please try that? |
@luisrudge just tested. Works fine using ng serve or ng build and fails with the error using ng serve --prod or ng build --prod. |
@wdrobinson perfect. I reproduced the issue. Thanks! @jstayton are you still using angular? |
@luisrudge No, I'm using Vue. |
@jstayton can you build a quick repro that I can test it? I'm assuming it has to do with how the code is being minified/bundled, but I'm still investigating. |
@luisrudge Yeah, I can try to throw something together. FWIW, I'm seeing this in development with Vue CLI, not just a production build like @wdrobinson found with Angular. |
I can reproduce this |
Ok folks, I found the issue. Not sure why, but vue-cli and ng-cli are aggressively trying to minify our already minified code, causing issues with one of our dependencies (qss). Because of this bug, when our code tries to get the query string from the URL, it doesn't find the |
@luisrudge Great sleuthing! Thanks for your work on this. |
Just encountered this issue in prod builds of |
Fixed in version 1.2.3 |
Confirmed upgrading to 1.2.3 works for me! |
@luisrudge Thanks for your work on this, but unfortunately, v1.2.3 didn't fix this for me. I've emailed you a HAR file with the details. |
It fixed it for me. Thanks!
…On Tue, Sep 3, 2019, 15:53 Justin Stayton ***@***.***> wrote:
@luisrudge <https://github.com/luisrudge> Thanks for your work on this,
but unfortunately, v1.2.3 didn't fix this for me. I've emailed you a HAR
file with the details.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#186?email_source=notifications&email_token=ABWOQR3HUQ4C46FVRFEBOF3QHZT6VA5CNFSM4IRRO2H2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5YIQZA#issuecomment-527468644>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABWOQRZG4WK64XWUWK6O2ELQHZT6VANCNFSM4IRRO2HQ>
.
|
@jstayton It would be useful for us to see a repro from yourself to get to the bottom of this. We have a version of our Vue quickstart that has been upgraded to use the latest version of the SDK, and unfortunately I can't repro the issue there. Could you perhaps try out this sample and compare the implementation with your own? |
Confirmed it's fixed for me as well! |
I am having this problem currently. When users "Continue with Google", this fails silently in the background
My app is set up using the React Quick Start instructions with no modifications to anything. |
@daviseford does it work if you use username/pass instead of google? are you using Auth0's development keys? |
Yes, and yes. I just created a ticket #245 for this if you want to move this conversation. |
Thanks! moving there. |
Hey 👋
I just tried upgrading from v1.1.1 to v1.2 (doesn't matter which patch version), and I now get an "Invalid state" error 100% of the time when calling
handleRedirectCallback
. I've tried in both Chrome and Firefox, cleared cookies, etc. I didn't change any code – just the version number inpackage.json
.I'm happy to provide more details, I'm just not sure what would be helpful to know in this case. Let me know. Thanks!
The text was updated successfully, but these errors were encountered: