I'm having a strange issue with identity server 4 (deployed as an Azure app service) and authentication on mobile devices. I'm using an OpenId connect .NET core MVC client to authenticate against my identity server (which is configured with AspNetIdentity). This is working absolutely fine with a desktop browser, but on an iphone when I log in it goes into an infinite loop bouncing back and fourth between id server and client (with mobile safari or chrome).
If I stop the loop and interrupt then navigate to the site, I'm authenticated which shows the cookie has been issue'd fine.
The bizarre thing is I have another system with a near identical setup that doesn't have this behaviour. As there's no error's and I can only reproduce on a mobile in my staging environment, I'm finding it hard to figure out steps to diagnose the issue, or where I should be looking.
I'm not issuing a large number of claims or anything that would bloat the cookie size.
It's pretty much identical to this issue with identity server 3:
IdentityServer3 constant redirect on login only on mobile
Any pointers on what I should be looking for here would be great.
There were some changes in iOS12 Safari that broke oidc logins if using the default configuration. As detailed here: https://github.com/aspnet/Security/issues/1864