SilentCallback.component.tsx Bug: OIDC Client Error 'No state in response'
See original GitHub issueIssue and Steps to Reproduce
Trying to use the Silent Callback, and when I have the OIDC logger set to DEBUG, I see an error about “No state in response.”
After looking through your code, I can’t find a way to override the SilentCallback.component (that’s an enhancement request) in order to test my theory, so I had to fully bypass the React control.
If we look at your code here: https://github.com/AxaGuilDEv/react-oidc/blob/06ca2dd66e06bcc485c8e8cd57cdcff2da6ab6a5/packages/core/src/callbacks/SilentCallback.component.tsx#L11, we see that you’re instantiating up a new UserManager
without the same configuration as what we use to send the request.
To test my theory, I used a plain .html with a script on it.
<script src="https://cdnjs.cloudflare.com/ajax/libs/oidc-client/1.10.1/oidc-client.min.js" integrity="sha512-J+l1VucK7pEidJ+w1fYQfo0Yq4LGkTXwKQ3w9Y9/c4O2NoQe+DgiIwvh2ocNVv4ost5H6W4uhy1K2sw5tWO+ew==" crossorigin="anonymous"></script>
<script>
var configuration = Object.assign(window.myConfig.oidc, {
userStore: new Oidc.WebStorageStateStore({ store: window.localStorage }),
automaticSilentRenew: true,
filterProtocolClaims: true,
loadUserInfo: true
});
var mgr = new Oidc.UserManager(configuration);
mgr.signinSilentCallback().then(user => {
console.log("Success????!!");
}).catch(reason => {
debugger;
});
</script>
And this works perfectly.
Versions
“@axa-fr/react-oidc-context”: “^3.1.6”,
Screenshots
Expected
Actual
Additional Details
- Installed packages:
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
No state in response after callback in oidc-client-js
With angular 5.2.7 work fine. I create a ng5 branch and update angular to latest 5.2.8 and the error com in! anybody can...
Read more >@nevzatcirak/react-oidc-client - npm
Hint: This component must be used inside the BrowserRouter and AuthenticationProvider . Props. Mandatory, Name, Description. ✓, children, Child ...
Read more >[Solved]-Error: No state in response using oidc-client-js-node.js
I assume that this code is to handle the response (tokens) received from idp right? if so, did you check the signin request?...
Read more >How to use the oidc-client.UserManager function in ... - Snyk
Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues...
Read more >https://amdigitalsolutions.pwc.lu/static/js/5.2494...
node_modules/oidc-client/lib/oidc-client.min.js",". ... node_modules/@axa-fr/react-oidc-core/dist/callbacks/SilentCallback.component.js",".
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for the issue, sorry we were a bit overwhelmed. I’ll look all the issues soon
Thank you for the issue. I close it. Feel free to reopen it if you have the bug with the version 4.