FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login
    1. Home
    2. j.arensman
    J
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 2
    • Best 1
    • Controversial 0
    • Groups 0

    j.arensman

    @j.arensman

    1
    Reputation
    1
    Profile views
    2
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    j.arensman Unfollow Follow

    Best posts made by j.arensman

    • RE: OpenIdConnectProtocolException on Securing an ASP.NET Core Razor Pages app with OAuth tutorial

      Hi @dan,

      Thanks for your reply, I have downgraded the packages to the versions used in the example you provided, but that made no difference. But thanks to your comment I was checking the ClientSecret while debuggen and it turned out that some Windows environment variable also was named SampleApp__ClientSecret and thus was overwriting the value I provided in my appsettings.json. After setting the ClientSecret in the immediate window in Visual Studio, I was able to redirect after logging in. Now, I only have to figure out which application is setting the SampleApp__ClientSecret environment variable.

      posted in Q&A
      J
      j.arensman

    Latest posts made by j.arensman

    • RE: OpenIdConnectProtocolException on Securing an ASP.NET Core Razor Pages app with OAuth tutorial

      Hi @dan,

      Thanks for your reply, I have downgraded the packages to the versions used in the example you provided, but that made no difference. But thanks to your comment I was checking the ClientSecret while debuggen and it turned out that some Windows environment variable also was named SampleApp__ClientSecret and thus was overwriting the value I provided in my appsettings.json. After setting the ClientSecret in the immediate window in Visual Studio, I was able to redirect after logging in. Now, I only have to figure out which application is setting the SampleApp__ClientSecret environment variable.

      posted in Q&A
      J
      j.arensman
    • OpenIdConnectProtocolException on Securing an ASP.NET Core Razor Pages app with OAuth tutorial

      Hi all,

      I am trying the Securing an ASP.NET Core Razor Pages app with OAuth tutorial. I have just created the Secure page, but when I want to open the Secure page, after logging in, I am getting the following exception:

      Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectProtocolException: Message contains error: 'invalid_client', error_description: 'Invalid client authentication credentials.', error_uri: 'error_uri is null'.
         at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.RedeemAuthorizationCodeAsync(OpenIdConnectMessage tokenEndpointRequest)
         at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleRemoteAuthenticateAsync()
      
      System.Exception: An error was encountered while handling the remote login.
       ---> Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectProtocolException: Message contains error: 'invalid_client', error_description: 'Invalid client authentication credentials.', error_uri: 'error_uri is null'.
         at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.RedeemAuthorizationCodeAsync(OpenIdConnectMessage tokenEndpointRequest)
         at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleRemoteAuthenticateAsync()
         --- End of inner exception stack trace ---
         at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler`1.HandleRequestAsync()
         at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
         at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
      

      Does anyone have any idea how to solve this?

      I am running the latest FustionAuth in Docker. And my SampleApp is running in .Net 5.0 with the following packages:

      • Microsoft.AspNetCore.Authentication.OpenIdConnect v5.0.1
      • IdentityModel.AspNetCore v3.0.0
      posted in Q&A
      J
      j.arensman