IdentityServer2 icon indicating copy to clipboard operation
IdentityServer2 copied to clipboard

GetOAuthContextCookie throws InvalidOperationException

Open shcherbachev opened this issue 11 years ago • 5 comments

Hi!

We are using IndetityServer together with Google's OAuth2 as identity provider. From time to time, the /issue/hrd/oauth2callback will fail with "Sorry, an error occurred while processing your request." and won't let user in. Event viewer has the following message and stack trace recorded:

Exception type: InvalidOperationException 
    Exception message: cookie
   at Thinktecture.IdentityServer.Protocols.WSFederation.HrdController.GetOAuthContextCookie()
   at Thinktecture.IdentityServer.Protocols.WSFederation.HrdController.<OAuthTokenCallback>d__6.MoveNext()

I checked the cookies, and indeed idsrvoauthcontext has the value of "." there.. so doesn't look right.

Is this a known issue? Is there any way to fix it?

shcherbachev avatar Jul 10 '14 16:07 shcherbachev

Hi! have the same issue with Linkedin as OAuth2 IdP. A temporary solution is to clean my browser cache and try to log again.

Alakaj avatar Aug 07 '14 16:08 Alakaj

Yep, clearing browser cache works for us too. However, this still looks like a bug. We recently updated to most recent version from sources.. still the same.

shcherbachev avatar Aug 07 '14 16:08 shcherbachev

Any progress made on this? I am still seeing this on every LinkedIn provided that is available...

juzkuz-zz avatar Dec 06 '14 16:12 juzkuz-zz

Sorry for the delay -- we've been working on IdSvrv3 and this lot lost in the mix.

Do you have consistent steps to repro the issue, or is it just intermittent?

brockallen avatar Dec 07 '14 18:12 brockallen

I am currently experiencing what seems to be at least a very similar issue. We can wire up facebook as an Identity Provider and login to to register Relying Parties using hrd, however when we try to do the same with our google credentials we get the 'Sorry, an error occurred while processing your request.' message. Was there ever a resolution to the above mentioned using v2?

Our problem seems different in that it is not intermittent. Our current setup is we have IdSrv behind a load balancer which handles SSL. So, we have IdSrv configured with SSL disabled.

MJurmo avatar Oct 23 '15 13:10 MJurmo