Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Startup problems? #10

Open
Pulseweaver opened this issue Nov 6, 2020 · 0 comments
Open

Startup problems? #10

Pulseweaver opened this issue Nov 6, 2020 · 0 comments

Comments

@Pulseweaver
Copy link

Hi,

I have problems to get this running, this is what I done :

  • Setup keyclock according to the link. login-callback.html is changed to signin-oidc-callback.html(from the project README.md).
  • appsettings.json is setup like this :

"Oidc": { "Authority": "http://localhost:8080/auth/realms/master", "ClientId": "aspnetcore-keycloak", "ClientSecret": "a057c429-d7d0-4ecb-9f13-8d444587353a" } }

The http://localhost:8080/auth/realms/master is browsable while https://localhost:5001/signin-oidc will throw the following exception :

fail: Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware1 An unhandled exception has occurred while executing the request. System.Exception: An error was encountered while handling the remote login. ---> System.Exception: OpenIdConnectAuthenticationHandler: message.State is null or empty. --- End of inner exception stack trace --- at Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler1.HandleRequestAsync() at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)`

The https://localhost:5001/signin-oidc-callback.html is not reachable and https://localhost:5001/ returns the following :

["http://localhost:8080/auth/realms/master/.well-known/openid-configuration","https://localhost:5001/api/values","https://localhost:5001/signin-oidc","https://localhost:5001/signout-oidc","==== IDENTITY ===============",null,null,"==== TOKENS ===============",null,null,null,"==== HEADERS ===============","HEADER Cache-Control: max-age=0 | HEADER Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,/;q=0.8,application/signed-exchange;v=b3;q=0.9 | HEADER Accept-Encoding: gzip, deflate, br | HEADER Accept-Language: sv,en-US;q=0.9,en;q=0.8 | HEADER Host: localhost:5001 | HEADER User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36 | HEADER Upgrade-Insecure-Requests: 1 | HEADER :method: GET | HEADER :authority: localhost:5001 | HEADER :scheme: https | HEADER :path: / | HEADER sec-fetch-site: none | HEADER sec-fetch-mode: navigate | HEADER sec-fetch-user: ?1 | HEADER sec-fetch-dest: docume

What am I missing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant