Closed jonasb closed 1 year ago
I'm seeing the exact same problem:
https://....auth0.com/authorize
?authorizationParams=[object Object]
&client_id=L...
&scope=openid profile email
&response_type=code
&response_mode=query
&state=bXYy...==
&nonce=TktlbV...==
&code_challenge=A985...
&code_challenge_method=S256
&auth0Client=eyJuYW...=
Thanks for reaching out. Can you verify this happens when both auth0-react v2 and auth0-spa-js v2 are installed locally?
I tried reproducing this, but it looks like we can successfully authenticate after upgrading our React sample to v2, you can have a look at https://github.com/auth0-samples/auth0-react-samples.
Can you reproduce the broken behavior in that sample? Or point to any differences that could cause it in your situation?
Hi @frederikprijck.
npm install @auth0/auth0-spa-js
fixed the issue!
Perhaps we needed this dependency all along? It worked fine beforehand however without it.
In any case, if it's a hard new requirement, let's please have the v2 migration guide reflect that.
Best!
Hey @seljabali ,
In any case, if it's a hard new requirement,
No, you should not have to explicitly install auth0-spa-js manually, sorry about that confusion. But installing auth0-react should install auth0-spa-js, and installing v2 of auth0-react should install v2 of auth0-spa-js.
Looking at the error here, I assume it's mixing auth0-react v2 with auth0-spa-js v1, which is not supported.
I am mostly wondering what versions you had, without explicitly installing auth0-spa-js.
How did you upgrade auth0-react? Did npm warn you about any incompatible versions?
@frederikprijck,
I just checked out the commit before adding auth0-spa-js
dependency manually and ran it, however didn't come across the error. Perhaps it was a build caching issue? I'm not sure.
Thanks again for the help! Hope this helps others.
@frederikprijck I'm using pnpm
as the package manager (wrapped by rush). Adding @auth0/auth0-spa-js
didn't fix the issue for me, but purging all node_modules
and reinstalling worked for me (rush purge && rush update
).
Thanks for the assistance! 👋
my team also ran into this problem while using pnpm
. removing node_modules
and re-installing also worked for us. thank you for the help!
Describe the problem
After upgrading to v2.0.0 the browser is opening an auth0 url where the
authorizationParams
is[object Object]
, i.e. invalid. The url ishttps://dossierhq-tutorial.eu.auth0.com/authorize?authorizationParams=%5Bobject%20Object%5D&client_id=....
What was the expected behavior?
It should be possible to login.
Reproduction
(Sorry, haven't had the time to recreate a minimal repro)
loginWithRedirect()
Can the behavior be reproduced using the React SDK Playground?
If so, provide steps:
Environment
auth0-react
used: 2.0.0