Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

MVC Quickstart does not log in #1885

Closed
AleksandrAlbert opened this issue Dec 16, 2017 · 23 comments
Closed

MVC Quickstart does not log in #1885

AleksandrAlbert opened this issue Dec 16, 2017 · 23 comments

Comments

@AleksandrAlbert
Copy link

AleksandrAlbert commented Dec 16, 2017

Hey, I am trying to get the IdentityServer with EF sample to run but am running into a strange problem. When I click on the 'Secure' tab in the MVC home page, it takes me to the IS4 login. However after I enter my credentials and click log in, I get redirected back to the login page. I have verified that the User exists in the database. Here are the logs I get making these requests:

2017-12-16 17:21:33.539 -04:00 [DBG] Using Identity.Application as default scheme for authentication
2017-12-16 17:21:33.583 -04:00 [DBG] Using Identity.External as default scheme for sign-in
2017-12-16 17:21:33.585 -04:00 [DBG] Using Identity.External as default scheme for sign-out
2017-12-16 17:21:33.585 -04:00 [DBG] Using Identity.Application as default scheme for challenge
2017-12-16 17:21:33.586 -04:00 [DBG] Using Identity.Application as default scheme for forbid
2017-12-16 17:21:33.720 -04:00 [DBG] Starting token cleanup
2017-12-16 17:21:36.466 -04:00 [DBG] Request path /connect/authorize matched to endpoint type Authorize
2017-12-16 17:21:36.499 -04:00 [DBG] Endpoint enabled: Authorize, successfully created handler: IdentityServer4.Endpoints.AuthorizeEndpoint
2017-12-16 17:21:36.502 -04:00 [INF] Invoking IdentityServer endpoint: IdentityServer4.Endpoints.AuthorizeEndpoint for /connect/authorize
2017-12-16 17:21:36.514 -04:00 [DBG] Start authorize request
2017-12-16 17:21:36.531 -04:00 [DBG] No user present in authorize request
2017-12-16 17:21:36.539 -04:00 [DBG] Start authorize request protocol validation
2017-12-16 17:21:37.900 -04:00 [DBG] mvc found in database: true
2017-12-16 17:21:37.915 -04:00 [DBG] Checking for PKCE parameters
2017-12-16 17:21:37.917 -04:00 [DBG] No PKCE used.
2017-12-16 17:21:38.017 -04:00 [DBG] Found ["openid","profile"] identity scopes in database
2017-12-16 17:21:38.345 -04:00 [DBG] Found ["api1"] API scopes in database
2017-12-16 17:21:38.370 -04:00 [DBG] Found ["openid","profile"] identity scopes in database
2017-12-16 17:21:38.382 -04:00 [DBG] Found ["api1"] API scopes in database
2017-12-16 17:21:38.398 -04:00 [DBG] Calling into custom validator: IdentityServer4.Validation.DefaultCustomAuthorizeRequestValidator
2017-12-16 17:21:38.495 -04:00 [INF] ValidatedAuthorizeRequest
{
"ClientId": "mvc",
"ClientName": "MVC Client",
"RedirectUri": "http://localhost:5002/signin-oidc",
"AllowedRedirectUris": [
"http://localhost:5002/signin-oidc"
],
"SubjectId": "anonymous",
"ResponseType": "code id_token",
"ResponseMode": "form_post",
"GrantType": "hybrid",
"RequestedScopes": "openid profile api1 offline_access",
"State": "CfDJ8OjFhWHnTLBEporSKt_A6SqBDQbwqg26gGARan3UYPBz6RCfh0BazL0IWdxWjjgzJU7Qknp01KHWRMy_VSdJ8H7Jbbwsxhj2c5JZ8Jk5NFb-EASixxCCE3UH19kdWu9H_MpW33PqRVIAkQGuk7lVLmaRa85bWMYEMIh8N5zUbXjDCi90qj_lokqwxMmlZ3avfgVo3NaTEGh94CZzvEa5I33D2WbSx1h4xA2SVOZqJNWZESWCQazUuQt8745dUVe0fx8fecSDBlZJK2F_QNh5I-6FPw7uCrlZUKYNhbkWUdyvNazMIVQIrxq8RUcjgfL-_cYIVyPi5cVUPtHg90uuNJ4",
"Nonce": "636490560962891702.OGQ5ZjE0OGQtN2Y1My00NzRhLTg0MjktZWFkMTU2YmViODhjMDk2YTc0M2YtNGY1MC00M2JiLTlhNjQtN2RjMjE1NDZmYzJh",
"Raw": {
"client_id": "mvc",
"redirect_uri": "http://localhost:5002/signin-oidc",
"response_type": "code id_token",
"scope": "openid profile api1 offline_access",
"response_mode": "form_post",
"nonce": "636490560962891702.OGQ5ZjE0OGQtN2Y1My00NzRhLTg0MjktZWFkMTU2YmViODhjMDk2YTc0M2YtNGY1MC00M2JiLTlhNjQtN2RjMjE1NDZmYzJh",
"state": "CfDJ8OjFhWHnTLBEporSKt_A6SqBDQbwqg26gGARan3UYPBz6RCfh0BazL0IWdxWjjgzJU7Qknp01KHWRMy_VSdJ8H7Jbbwsxhj2c5JZ8Jk5NFb-EASixxCCE3UH19kdWu9H_MpW33PqRVIAkQGuk7lVLmaRa85bWMYEMIh8N5zUbXjDCi90qj_lokqwxMmlZ3avfgVo3NaTEGh94CZzvEa5I33D2WbSx1h4xA2SVOZqJNWZESWCQazUuQt8745dUVe0fx8fecSDBlZJK2F_QNh5I-6FPw7uCrlZUKYNhbkWUdyvNazMIVQIrxq8RUcjgfL-_cYIVyPi5cVUPtHg90uuNJ4",
"x-client-SKU": "ID_NET",
"x-client-ver": "2.1.4.0"
}
}
2017-12-16 17:21:38.516 -04:00 [INF] Showing login: User is not authenticated
2017-12-16 17:21:38.742 -04:00 [INF] AuthenticationScheme: Identity.External signed out.
2017-12-16 17:21:38.759 -04:00 [DBG] Start authorize request protocol validation
2017-12-16 17:21:38.771 -04:00 [DBG] mvc found in database: true
2017-12-16 17:21:38.771 -04:00 [DBG] Checking for PKCE parameters
2017-12-16 17:21:38.774 -04:00 [DBG] No PKCE used.
2017-12-16 17:21:38.781 -04:00 [DBG] Found ["openid","profile"] identity scopes in database
2017-12-16 17:21:38.791 -04:00 [DBG] Found ["api1"] API scopes in database
2017-12-16 17:21:38.801 -04:00 [DBG] Found ["openid","profile"] identity scopes in database
2017-12-16 17:21:38.810 -04:00 [DBG] Found ["api1"] API scopes in database
2017-12-16 17:21:38.812 -04:00 [DBG] Calling into custom validator: IdentityServer4.Validation.DefaultCustomAuthorizeRequestValidator
2017-12-16 17:22:00.441 -04:00 [DBG] Augmenting SignInContext
2017-12-16 17:22:00.455 -04:00 [INF] AuthenticationScheme: Identity.Application signed in.
2017-12-16 17:22:00.461 -04:00 [INF] User logged in.
2017-12-16 17:22:00.473 -04:00 [DBG] Request path /connect/authorize/callback matched to endpoint type Authorize
2017-12-16 17:22:00.477 -04:00 [DBG] Endpoint enabled: Authorize, successfully created handler: IdentityServer4.Endpoints.AuthorizeCallbackEndpoint
2017-12-16 17:22:00.479 -04:00 [INF] Invoking IdentityServer endpoint: IdentityServer4.Endpoints.AuthorizeCallbackEndpoint for /connect/authorize/callback
2017-12-16 17:22:00.489 -04:00 [DBG] Start authorize callback request
2017-12-16 17:22:00.495 -04:00 [DBG] No user present in authorize request
2017-12-16 17:22:00.496 -04:00 [DBG] Start authorize request protocol validation
2017-12-16 17:22:00.510 -04:00 [DBG] mvc found in database: true
2017-12-16 17:22:00.510 -04:00 [DBG] Checking for PKCE parameters
2017-12-16 17:22:00.515 -04:00 [DBG] No PKCE used.
2017-12-16 17:22:00.527 -04:00 [DBG] Found ["openid","profile"] identity scopes in database
2017-12-16 17:22:00.537 -04:00 [DBG] Found ["api1"] API scopes in database
2017-12-16 17:22:00.544 -04:00 [DBG] Found ["openid","profile"] identity scopes in database
2017-12-16 17:22:00.554 -04:00 [DBG] Found ["api1"] API scopes in database
2017-12-16 17:22:00.556 -04:00 [DBG] Calling into custom validator: IdentityServer4.Validation.DefaultCustomAuthorizeRequestValidator
2017-12-16 17:22:00.562 -04:00 [INF] ValidatedAuthorizeRequest
{
"ClientId": "mvc",
"ClientName": "MVC Client",
"RedirectUri": "http://localhost:5002/signin-oidc",
"AllowedRedirectUris": [
"http://localhost:5002/signin-oidc"
],
"SubjectId": "anonymous",
"ResponseType": "code id_token",
"ResponseMode": "form_post",
"GrantType": "hybrid",
"RequestedScopes": "openid profile api1 offline_access",
"State": "CfDJ8OjFhWHnTLBEporSKt_A6SqBDQbwqg26gGARan3UYPBz6RCfh0BazL0IWdxWjjgzJU7Qknp01KHWRMy_VSdJ8H7Jbbwsxhj2c5JZ8Jk5NFb-EASixxCCE3UH19kdWu9H_MpW33PqRVIAkQGuk7lVLmaRa85bWMYEMIh8N5zUbXjDCi90qj_lokqwxMmlZ3avfgVo3NaTEGh94CZzvEa5I33D2WbSx1h4xA2SVOZqJNWZESWCQazUuQt8745dUVe0fx8fecSDBlZJK2F_QNh5I-6FPw7uCrlZUKYNhbkWUdyvNazMIVQIrxq8RUcjgfL-_cYIVyPi5cVUPtHg90uuNJ4",
"Nonce": "636490560962891702.OGQ5ZjE0OGQtN2Y1My00NzRhLTg0MjktZWFkMTU2YmViODhjMDk2YTc0M2YtNGY1MC00M2JiLTlhNjQtN2RjMjE1NDZmYzJh",
"Raw": {
"client_id": "mvc",
"redirect_uri": "http://localhost:5002/signin-oidc",
"response_type": "code id_token",
"scope": "openid profile api1 offline_access",
"response_mode": "form_post",
"nonce": "636490560962891702.OGQ5ZjE0OGQtN2Y1My00NzRhLTg0MjktZWFkMTU2YmViODhjMDk2YTc0M2YtNGY1MC00M2JiLTlhNjQtN2RjMjE1NDZmYzJh",
"state": "CfDJ8OjFhWHnTLBEporSKt_A6SqBDQbwqg26gGARan3UYPBz6RCfh0BazL0IWdxWjjgzJU7Qknp01KHWRMy_VSdJ8H7Jbbwsxhj2c5JZ8Jk5NFb-EASixxCCE3UH19kdWu9H_MpW33PqRVIAkQGuk7lVLmaRa85bWMYEMIh8N5zUbXjDCi90qj_lokqwxMmlZ3avfgVo3NaTEGh94CZzvEa5I33D2WbSx1h4xA2SVOZqJNWZESWCQazUuQt8745dUVe0fx8fecSDBlZJK2F_QNh5I-6FPw7uCrlZUKYNhbkWUdyvNazMIVQIrxq8RUcjgfL-_cYIVyPi5cVUPtHg90uuNJ4",
"x-client-SKU": "ID_NET",
"x-client-ver": "2.1.4.0"
}
}
2017-12-16 17:22:00.570 -04:00 [INF] Showing login: User is not authenticated
2017-12-16 17:22:00.580 -04:00 [INF] AuthenticationScheme: Identity.External signed out.
2017-12-16 17:22:00.581 -04:00 [DBG] Start authorize request protocol validation
2017-12-16 17:22:00.591 -04:00 [DBG] mvc found in database: true
2017-12-16 17:22:00.592 -04:00 [DBG] Checking for PKCE parameters
2017-12-16 17:22:00.593 -04:00 [DBG] No PKCE used.
2017-12-16 17:22:00.601 -04:00 [DBG] Found ["openid","profile"] identity scopes in database
2017-12-16 17:22:00.610 -04:00 [DBG] Found ["api1"] API scopes in database
2017-12-16 17:22:00.617 -04:00 [DBG] Found ["openid","profile"] identity scopes in database
2017-12-16 17:22:00.626 -04:00 [DBG] Found ["api1"] API scopes in database
2017-12-16 17:22:00.627 -04:00 [DBG] Calling into custom validator: IdentityServer4.Validation.DefaultCustomAuthorizeRequestValidator
2017-12-16 17:22:03.763 -04:00 [INF] Clearing 0 tokens
2017-12-16 17:22:07.013 -04:00 [DBG] TaskCanceledException. Exiting.
2017-12-16 17:22:07.040 -04:00 [DBG] Stopping token cleanup

@brockallen
Copy link
Member

2017-12-16 17:21:33.583 -04:00 [DBG] Using Identity.External as default scheme for sign-in

This shows me you're not setting the schemes properly.

@AleksandrAlbert
Copy link
Author

AleksandrAlbert commented Dec 17, 2017

Hmm, I'm just running the sample directly though. Here is the startup for the sample I'm using:

https://github.com/IdentityServer/IdentityServer4.Samples/blob/release/Quickstarts/Combined_AspNetIdentity_and_EntityFrameworkStorage/src/IdentityServerWithAspIdAndEF/Startup.cs

EDIT: I debugged the application and see that it successfully logs me in, its when it gets to the RedirectToLocal it ends up getting sent back to the login page. Here is the returnUrl:

/connect/authorize/callback?client_id=mvc&redirect_uri=http%3A%2F%2Flocalhost%3A5002%2Fsignin-oidc&response_type=code%20id_token&scope=openid%20profile%20api1%20offline_access&response_mode=form_post&nonce=636490923885536368.NGNiZGRhMjgtZGQ2NC00ZmYxLWIyZTMtYjljNjU0YWE3OWZkNjI1YjY0ZDAtZjYzNC00OGRhLWE5YTctNzU0NzEwMDdmMWE1&state=CfDJ8OjFhWHnTLBEporSKt_A6SqUH9w0t_56z2jzQ4sCF0LtSl0bB_ixV5DrhAhFVPBt1VOJqmYjjDET15DaS8fwjHis22ZayFuxrROsCabDIZzHjhFsOsBwDVno8AIaQXVQ0zQGtEx4FErmkknGLOE2z33VfqT6p55ryTafPxjWEHmKfD92BdoN0ynScRPv2WkTnWrLu-zjyx-iH9LUpKPmy18V-NI5aDR5hpCPEHyNLsuEPm91fndCsln5ypZ5ESw9v-6gMwcwOrV1g-J2foVL1zRkmcwtlJoLwJEBWVLhzgoX5RNEsucGBbJjTASPsqslDDgISwomo3YEyTrSXZqfpMs&x-client-SKU=ID_NET&x-client-ver=2.1.4.0

@AleksandrAlbert
Copy link
Author

@brockallen Could you let me know what the default schemes should be for these?

2017-12-16 17:21:33.539 -04:00 [DBG] Using Identity.Application as default scheme for authentication
2017-12-16 17:21:33.583 -04:00 [DBG] Using Identity.External as default scheme for sign-in
2017-12-16 17:21:33.585 -04:00 [DBG] Using Identity.External as default scheme for sign-out
2017-12-16 17:21:33.585 -04:00 [DBG] Using Identity.Application as default scheme for challenge
2017-12-16 17:21:33.586 -04:00 [DBG] Using Identity.Application as default scheme for forbid

@brockallen
Copy link
Member

Have you made any modifications to the completed code for the quickstart? If so, then diff those with our version to see what might be causing the issue.

@AleksandrAlbert
Copy link
Author

AleksandrAlbert commented Dec 18, 2017

I have not made any modifications to the source, running as is (downloaded again to make sure). I decided to test some other quickstarts, and was able to get the Mvc Client sample working using Quickstart 7(The javascript client sample, no AspNetIdentity or EF), but was not able to get the Mvc Client working with Quickstart 6 (the AspNetIdentity sample). I ran into the same problem of an infinite login loop with this one.

The Mvc Client startup is the same in both Quickstart 6 and 7. The Mvc client definitions in the IdSrv Config of both 6 and 7 are also the same (6 has Require consent = true, but commenting this out does not fix the issue). The biggest differences are in the Identity Server startup files in 6 and 7, as well as the Login methods of the Account controller.

Could you try running Quickstart 6 and see if you are having the same issues? When I launch the Identity Server in Quickstart 6 this is the console output:

info: IdentityServer4.Startup[0]
You are using the in-memory version of the persisted grant store. This will store consent decisions, authorization codes, refresh and reference tokens in memory only. If you are using any of those features in production, you want to switch to a different store implementation.
dbug: IdentityServer4.Startup[0]
Using Identity.Application as default scheme for authentication
dbug: IdentityServer4.Startup[0]
Using Identity.External as default scheme for sign-in
dbug: IdentityServer4.Startup[0]
Using Identity.External as default scheme for sign-out
dbug: IdentityServer4.Startup[0]
Using Identity.Application as default scheme for challenge
dbug: IdentityServer4.Startup[0]
Using Identity.Application as default scheme for forbid

@ChristianRMKoerber
Copy link

I am having the very same issue. Worked my way through all the quick start examples (with the exception of the Google one) and got them all working.
This one however does not work for me as well and I am also being redirected to the login page.

@brockallen
Copy link
Member

I just re-ran the quickstart 6 and logged into the MVC client and it's all working fine for me.

@brockallen
Copy link
Member

And @AleksandrAlbert -- I was mistaken -- the schemes for that sample look correct.

@ChristianRMKoerber
Copy link

I was following these instructions: http://docs.identityserver.io/en/release/quickstarts/6_aspnet_identity.html

I cannot clone this sample because on windows 7 even when using a rather short path the file names are too long:
C:\Users\myname\tt>git clone https://github.com/IdentityServer/IdentityServer4.Samples.git
Cloning into 'IdentityServer4.Samples'...
remote: Counting objects: 4757, done.
remote: Compressing objects: 100% (67/67), done.
remote: Total 4757 (delta 43), reused 54 (delta 23), pack-reused 4662
Receiving objects: 100% (4757/4757), 7.04 MiB | 546.00 KiB/s, done.
Resolving deltas: 100% (3188/3188), done.
error: unable to create file Quickstarts/Combined_AspNetIdentity_and_EntityFrameworkStorage/src/IdentityServerWithAspIdAndEF/Data/Migrations/IdentityServer/ConfigurationDb/20171005153917_InitialIdentityServerConfigurationDbMigration.Designer.cs: Filename too long
error: unable to create file Quickstarts/Combined_AspNetIdentity_and_EntityFrameworkStorage/src/IdentityServerWithAspIdAndEF/Data/Migrations/IdentityServer/PersistedGrantDb/20171005153857_InitialIdentityServerPersistedGrantDbMigration.Designer.cs: Filename too long
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD

@ChristianRMKoerber
Copy link

ChristianRMKoerber commented Dec 18, 2017

Cloned everything straight to c:\q\ and that succeeded.
However, I am still seeing exactly the same issue using server and mvc client from the repository. All I changed was setting the url for the server to http://localhost:5000/

@brockallen
Copy link
Member

All I changed was setting the url for the server to http://localhost:5000/

You mean the IdentityServer host?

@ChristianRMKoerber
Copy link

yes

@brockallen
Copy link
Member

brockallen commented Dec 18, 2017

Well, I'm stumped. My IdSvr host is at the same URL. And the client is http://localhost:5002/.

@ChristianRMKoerber
Copy link

ChristianRMKoerber commented Dec 18, 2017

Works if the client is opened in Chrome but fails in Firefox. Well, maybe it is some kind of chaching issue. I was running quickstarts 3 and 4 before this one.

@ChristianRMKoerber
Copy link

ChristianRMKoerber commented Dec 18, 2017

Yes, I deleted all cookies related to localhost:5000 in Firefox and then it worked. I should mention that restarting the computer did not help at all.

@brockallen
Copy link
Member

So @AleksandrAlbert can you see if that's also your issue?

@AleksandrAlbert
Copy link
Author

Ah Yes! Clearing my localhost cookies fixed the issue with Quickstart 6. I will test with my main project now. I wonder what caused this, clearing cookies is probably not something an end user would think of doing

@brockallen
Copy link
Member

I wonder if you had clicked the "remember my login"? also, i often see this type of problem on localhost since those cookies are shared across ports and the default cookie name tends to get used across several apps.

@VictorioBerra
Copy link
Contributor

I had the exact same issue and fixed by clearing everything in my browser. Must be a super weird cookie issue.

@asuricode
Copy link

Hello,

I am having the same issue and bagging my head... IdentityServer4 with ,Net Core 2.1 and ASP .Net identity and Entity framework as storage. All the steps taken the identity server comes up fine but when client tries to login the server side I see a message .. Showing login: User is not authenticated

The client is MVC client based on Quickstart8.. BTW I get the same issue with JS client. Any pointers will be helpful.

some relevant log
IdentityServer4.Validation.AuthorizeRequestValidator:Debug: Calling into custom validator: IdentityServer4.Validation.DefaultCustomAuthorizeRequestValidator
IdentityServer4.Endpoints.AuthorizeCallbackEndpoint:Information: ValidatedAuthorizeRequest
{
"ClientId": "mvc",
"ClientName": "MVC Client",
"RedirectUri": "http://localhost:5002/signin-oidc",
"AllowedRedirectUris": [
"http://localhost:5002/signin-oidc"
],
"SubjectId": "anonymous",
"ResponseType": "code id_token",
"ResponseMode": "form_post",
"GrantType": "hybrid",
"RequestedScopes": "openid profile api1 offline_access",
"State": "CfDJ8OzjI7TMM49Kh80tDmnkQe-9u69FIh3cL0jrK3g7jaoxrrvkaflVT_5O0goqKsj60xBnCD_ryorDXoNtG6AmZT_xSXJHt-VC3pwOeMqcDWDlphmeAdjr7Tdx4q_tC1AWaCI_jvf_7wv9b1TDN7S2Ib9vO0NHDHFCssVNYHpaAQfjNR6Qgedd2Aqim4aPOjWRlMd_oK9HzZFP7BgAXuu46AK9emw1MwExtZDQw-jow-a8WdrHDjYMdKTFg9GWW78CO2E1Po3ujx4UXLJk89e2Tg11hCQuRF3N3WuWiEKgjOcKlOOsu1PrS6YPBkD1t5gh0ceaZBHzJyJysPVbunq-oNE",
"Nonce": "636765403391814380.NjllOWYwNmItNmE1NC00M2E2LTk5N2ItNWI5YWYwZjYyYmZjYTg5OGU1YzAtOTA5YS00YmRkLWJjNjUtZWY1YzYyMjE2ZDEz",
"Raw": {
"client_id": "mvc",
"redirect_uri": "http://localhost:5002/signin-oidc",
"response_type": "code id_token",
"scope": "openid profile api1 offline_access",
"response_mode": "form_post",
"nonce": "636765403391814380.NjllOWYwNmItNmE1NC00M2E2LTk5N2ItNWI5YWYwZjYyYmZjYTg5OGU1YzAtOTA5YS00YmRkLWJjNjUtZWY1YzYyMjE2ZDEz",
"state": "CfDJ8OzjI7TMM49Kh80tDmnkQe-9u69FIh3cL0jrK3g7jaoxrrvkaflVT_5O0goqKsj60xBnCD_ryorDXoNtG6AmZT_xSXJHt-VC3pwOeMqcDWDlphmeAdjr7Tdx4q_tC1AWaCI_jvf_7wv9b1TDN7S2Ib9vO0NHDHFCssVNYHpaAQfjNR6Qgedd2Aqim4aPOjWRlMd_oK9HzZFP7BgAXuu46AK9emw1MwExtZDQw-jow-a8WdrHDjYMdKTFg9GWW78CO2E1Po3ujx4UXLJk89e2Tg11hCQuRF3N3WuWiEKgjOcKlOOsu1PrS6YPBkD1t5gh0ceaZBHzJyJysPVbunq-oNE",
"x-client-SKU": "ID_NET",
"x-client-ver": "2.1.4.0"
}
}
IdentityServer4.ResponseHandling.AuthorizeInteractionResponseGenerator:Information: Showing login: User is not authenticated
Microsoft.AspNetCore.Hosting.Internal.WebHost:Information: Request finished in 211.2732ms 302
Microsoft.AspNetCore.Hosting.Internal.WebHost:Information: Request starting HTTP/1.1 GET http://localhost:44359/account/login?returnUrl=%2Fconnect%2Fauthorize%2Fcallback%3Fclient_id%3Dmvc%26redirect_uri%3Dhttp%253A%252F%252Flocalhost%253A5002%252Fsignin-oidc%26response_type%3Dcode%2520id_token%26scope%3Dopenid%2520profile%2520api1%2520offline_access%26response_mode%3Dform_post%26nonce%3D636765403391814380.NjllOWYwNmItNmE1NC00M2E2LTk5N2ItNWI5YWYwZjYyYmZjYTg5OGU1YzAtOTA5YS00YmRkLWJjNjUtZWY1YzYyMjE2ZDEz%26state%3DCfDJ8OzjI7TMM49Kh80tDmnkQe-9u69FIh3cL0jrK3g7jaoxrrvkaflVT_5O0goqKsj60xBnCD_ryorDXoNtG6AmZT_xSXJHt-VC3pwOeMqcDWDlphmeAdjr7Tdx4q_tC1AWaCI_jvf_7wv9b1TDN7S2Ib9vO0NHDHFCssVNYHpaAQfjNR6Qgedd2Aqim4aPOjWRlMd_oK9HzZFP7BgAXuu46AK9emw1MwExtZDQw-jow-a8WdrHDjYMdKTFg9GWW78CO2E1Po3ujx4UXLJk89e2Tg11hCQuRF3N3WuWiEKgjOcKlOOsu1PrS6YPBkD1t5gh0ceaZBHzJyJysPVbunq-oNE%26x-client-SKU%3DID_NET%26x-client-ver%3D2.1.4.0
Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker:Information: Route matched with {page = "/Account/Login", area = "Identity", action = "", controller = ""}. Executing action /Account/Login
Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker:Information: Executing handler method OnGetAsync with arguments (/connect/authorize/callback?client_id=mvc&redirect_uri=http%3A%2F%2Flocalhost%3A5002%2Fsignin-oidc&response_type=code%20id_token&scope=openid%20profile%20api1%20offline_access&response_mode=form_post&nonce=636765403391814380.NjllOWYwNmItNmE1NC00M2E2LTk5N2ItNWI5YWYwZjYyYmZjYTg5OGU1YzAtOTA5YS00YmRkLWJjNjUtZWY1YzYyMjE2ZDEz&state=CfDJ8OzjI7TMM49Kh80tDmnkQe-9u69FIh3cL0jrK3g7jaoxrrvkaflVT_5O0goqKsj60xBnCD_ryorDXoNtG6AmZT_xSXJHt-VC3pwOeMqcDWDlphmeAdjr7Tdx4q_tC1AWaCI_jvf_7wv9b1TDN7S2Ib9vO0NHDHFCssVNYHpaAQfjNR6Qgedd2Aqim4aPOjWRlMd_oK9HzZFP7BgAXuu46AK9emw1MwExtZDQw-jow-a8WdrHDjYMdKTFg9GWW78CO2E1Po3ujx4UXLJk89e2Tg11hCQuRF3N3WuWiEKgjOcKlOOsu1PrS6YPBkD1t5gh0ceaZBHzJyJysPVbunq-oNE&x-client-SKU=ID_NET&x-client-ver=2.1.4.0) - ModelState is Valid
Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationHandler:Information: AuthenticationScheme: Identity.External signed out.
Microsoft.AspNetCore.Mvc.RazorPages.Internal.PageActionInvoker:Information: Executed action /Account/Login in 9.1186ms
Microsoft.AspNetCore.Hosting.Internal.WebHost:Information: Request finished in 15.8194ms 200 text/html; charset=utf-8

@mikagouzee
Copy link

Same Issue for me :

2019-06-21 11:41:54.396 +02:00 [INF] Starting IdentityServer4 version 2.4.0.0
2019-06-21 11:41:54.407 +02:00 [INF] You are using the in-memory version of the persisted grant store. This will store consent decisions, authorization codes, refresh and reference tokens in memory only. If you are using any of those features in production, you want to switch to a different store implementation.
2019-06-21 11:41:54.412 +02:00 [INF] Using the default authentication scheme Identity.Application for IdentityServer
2019-06-21 11:41:54.412 +02:00 [DBG] Using Identity.Application as default ASP.NET Core scheme for authentication
2019-06-21 11:41:54.412 +02:00 [DBG] Using Identity.External as default ASP.NET Core scheme for sign-in
2019-06-21 11:41:54.412 +02:00 [DBG] Using Identity.External as default ASP.NET Core scheme for sign-out
2019-06-21 11:41:54.412 +02:00 [DBG] Using Identity.Application as default ASP.NET Core scheme for challenge
2019-06-21 11:41:54.413 +02:00 [DBG] Using Identity.Application as default ASP.NET Core scheme for forbid
2019-06-21 11:41:54.757 +02:00 [DBG] CORS request made for path: /.well-known/openid-configuration from origin: http://localhost:8080
2019-06-21 11:41:54.760 +02:00 [DBG] Client list checked and origin: http://localhost:8080 is allowed
2019-06-21 11:41:54.760 +02:00 [DBG] CorsPolicyService allowed origin: http://localhost:8080
2019-06-21 11:41:54.776 +02:00 [DBG] Login Url: /Account/Login
2019-06-21 11:41:54.776 +02:00 [DBG] Login Return Url Parameter: ReturnUrl
2019-06-21 11:41:54.777 +02:00 [DBG] Logout Url: /Account/Logout
2019-06-21 11:41:54.777 +02:00 [DBG] ConsentUrl Url: /consent
2019-06-21 11:41:54.777 +02:00 [DBG] Consent Return Url Parameter: returnUrl
2019-06-21 11:41:54.777 +02:00 [DBG] Error Url: /home/error
2019-06-21 11:41:54.777 +02:00 [DBG] Error Id Parameter: errorId
2019-06-21 11:41:54.799 +02:00 [DBG] Request path /.well-known/openid-configuration matched to endpoint type Discovery
2019-06-21 11:41:54.805 +02:00 [DBG] Endpoint enabled: Discovery, successfully created handler: IdentityServer4.Endpoints.DiscoveryEndpoint
2019-06-21 11:41:54.805 +02:00 [INF] Invoking IdentityServer endpoint: IdentityServer4.Endpoints.DiscoveryEndpoint for /.well-known/openid-configuration
2019-06-21 11:41:54.807 +02:00 [DBG] Start discovery request
2019-06-21 11:41:54.975 +02:00 [DBG] Request path /connect/authorize matched to endpoint type Authorize
2019-06-21 11:41:54.988 +02:00 [DBG] Endpoint enabled: Authorize, successfully created handler: IdentityServer4.Endpoints.AuthorizeEndpoint
2019-06-21 11:41:54.989 +02:00 [INF] Invoking IdentityServer endpoint: IdentityServer4.Endpoints.AuthorizeEndpoint for /connect/authorize
2019-06-21 11:41:54.997 +02:00 [DBG] Start authorize request
2019-06-21 11:41:55.010 +02:00 [DBG] No user present in authorize request
2019-06-21 11:41:55.013 +02:00 [DBG] Start authorize request protocol validation
2019-06-21 11:41:55.033 +02:00 [DBG] client configuration validation for client Code Autho succeeded.
2019-06-21 11:41:55.044 +02:00 [DBG] Checking for PKCE parameters
2019-06-21 11:41:55.078 +02:00 [DBG] Calling into custom validator: IdentityServer4.Validation.DefaultCustomAuthorizeRequestValidator
2019-06-21 11:41:55.094 +02:00 [INF] ValidatedAuthorizeRequest
{"ClientId":"Code Autho","ClientName":"code autho Klanik Code With PKCE","RedirectUri":"http://localhost:8080","AllowedRedirectUris":["http://localhost:8080"],"SubjectId":"anonymous","ResponseType":"code","ResponseMode":"query","GrantType":"authorization_code","RequestedScopes":"openid profile email api1","State":"a53f2786c13d460fa5271652c9871234","UiLocales":null,"Nonce":null,"AuthenticationContextReferenceClasses":null,"DisplayMode":null,"PromptMode":null,"MaxAge":null,"LoginHint":null,"SessionId":null,"Raw":{"client_id":"Code Autho","redirect_uri":"http://localhost:8080","response_type":"code","scope":"openid profile email api1","state":"a53f2786c13d460fa5271652c9871234","code_challenge":"ih1wDabwyipUIsHxQcdi6tCyhOy9pzYyLyWn3A6R_Kw","code_challenge_method":"S256"},"$type":"AuthorizeRequestValidationLog"}

2019-06-21 11:41:55.103 +02:00 [INF] Showing login: User is not authenticated

@mayankgaur
Copy link

Hi I am also facing same issue can anybody helps. below is my log
IdentityServer_log-20191231.txt

@lock
Copy link

lock bot commented Jan 30, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants