Skip to content

External Login, AuthenticationFailureException: "invalid_client" on callback #57

You must be logged in to vote

I managed to find out what the problem was and why the authorization code exchange failed.

With PAR in place this external IDP will enforce authentication not only on the PAR endpoint but also on the token endpoint. So when I received the authorization code and when trying to exchange the code for a token it rejected the request.
I figured that out quite quickly and was trying to solve the problem by adding the suggested code from ticket 899 in my Startup.cs class, right where AddOpenIdConnect() is called and the setup of the external provider takes place.

options.Events.OnAuthorizationCodeReceived = context =>
{
    context.Backchannel.SetBasicAuthenticationOAuth(context.TokenEndpointReq…

Replies: 2 comments

You must be logged in to vote
0 replies

You must be logged in to vote
0 replies
Answer selected by cliffi30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants