What is code challenge? How do I get it?
I'm trying to test my JS React SPA against IdentityServer4 DEMO server https://demo.identityserver.io/.
I do not set up local ASP .NET server, I'm not familiar with the technology. So I want to test against IdentityServer4 DEMO server https://demo.identityserver.io/.well-known/openid-configuration.
But demo server returns me
Sorry, there was an error : invalid_request
code challenge required
Documentation doesn't answer, it has only this which doesn't help much

My JS code
const config = {
authority: "https://demo.identityserver.io",
client_id: "interactive.confidential",
redirect_uri: "http://localhost:3000/callback",
response_type: "code",
scope:"openid profile email api offline_access",
post_logout_redirect_uri : "http://localhost:3000/post_logout",
};
const url = `https://demo.identityserver.io/connect/authorize?
client_id=${config.client_id}&
redirect_uri=${config.redirect_uri}&
response_type=${config.response_type}&
scope=${config.scope}`;
const onFormSubmit = async (ev: React.FormEvent) => {
window.location.replace(url);
};

<log goes here>
Documentation doesn't answer, it has only this which doesn't help much
The docs are not intended to teach you the protocols. You need to learn those yourself, and here's the link to the spec in question: https://tools.ietf.org/html/rfc7636
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Questions are community supported only and the authors/maintainers may or may not have time to reply. If you or your company would like commercial support, please see here for more information.
Hi All,
Had this error to, but IHMO it's a typical error that is thrown when you have a server / client configuration mismatched. For example you enable PKCE on the server (for a specific client id) but on the respective client you disable PKCE protection in the OIDC configuration setup, then this kind of error (code challenge required) will be thrown. So check your configs first :).
Kr,
Emmanuel.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.