Bizarre infinite redirect issue

Aug 3, 2015 at 2:20 PM
Hi guys, was hoping someone might be able to help me with an odd issue.

Have an application that started life as a SharePoint on Premise App, and has ended up being converted to an O365 app. During the conversion process I have removed the SharePoint components and have installed Microsoft.Owin.Security.OpenIdConnect. I have set up the app in AAD and have configured the Middleware as per the usual documentation.

The application allows you to successfully log in once. After that no other users can log in. This occurs whether it is in Chrome or IE, within the dev environment or signing in from a different client machine. You can see the browser bouncing back and forth between hitting the local app ([Authorize] attribute on the home controller), but with no resolution. (I've downgraded the openId components to version 3.0.0 from 3.0.1. Originally it would 400 and tell me the headers were too long. Multiple nonces being created and stored. )

The odd thing is that I created another more basic app with the same process from scratch to check whether I had screwed up the middleware configuration somewhere that I was just being blind to, but that built and ran, successfully allowing multiple logins as is expected.

I guess what I'm asking is, has anyone run across this before? If not, any tips for debugging?Considering I've got a brand new app to work correctly, I'm confident that my OpenId config is right, but it looks to me like there is something in the app that is clashing in the pipeline and busting it for other users signing in.

Any helpful advice would be appreciated. Any further information you need just shout (I realise there isn't a lot of detail in here, but I don't want to spend an age filling a page with what is potentially irrelevant info). I'm a Katana newbie so I'm still just getting my head around it.


Aug 3, 2015 at 2:39 PM
This could be related to a known issue where cookies can be dropped, causing the user to loose their sign-in status.
Marked as answer by AndyBTP on 8/5/2015 at 7:04 AM
Aug 3, 2015 at 2:54 PM
Edited Aug 3, 2015 at 2:56 PM
Hi Tratcher, thanks for chipping in!

I thought it might have been a cookie issue, but ruled it out with some testing because it affects everyone else logging in. Once "User A" has managed to sign in, "User B"..."User N" gets stuck in the infinite loop after they enter their credentials to the Azure login portal, effectively only allowing one user onto the app. The only way I can clear it is by restarting the app. Apologies if I'm being dense and missing the point you're raising.
Aug 3, 2015 at 2:57 PM
Use netmon, wireshark, or fiddler to look at the actual requests and responses to see if the cookies, redirects, etc. are flowing as expected.
Aug 5, 2015 at 2:03 PM
Hi, Apologies! I thought I'd already replied to this! Many thanks Tratcher. The problem was indeed linked to the cookie manager. I've implemented it as per the link you very kindly put up and it has solved my issues! Thanks again for your time, you really saved my bacon!