AppAuth-iOS icon indicating copy to clipboard operation
AppAuth-iOS copied to clipboard

SSO during same session, different client ID

Open videoAbyss opened this issue 7 years ago • 1 comments

Describe the bug Intermittently , SSO during the same session does not work with different client, but same IDP.

To Reproduce Steps to reproduce the behavior:

  1. Register User on IDP using clientID x
  2. Get Access Token and ID Token
  3. Now to access another part of app, SSO using same IDP, but different clientID y
  4. It takes user to Sign In Page, instead of SSO and returning with Tokens for this client
  5. All while never closing the app, or clearing any cookies.
  6. This ONLY happens sometimes.
  7. Never happens on Simulator
  8. Fixes the issue by going to Settings-> Safari -> Clear Cache
  9. ONLY using SFSafariViewController for now, since we don't want the Sign In pop up in all iOS versions

Expected behavior

  1. Should SSO into the new client using new clientId

Screenshots

  • null

Smartphone (please complete the following information):

  • Device: Iphone 8, XSMax, 7+
  • OS: 12.1, 13.0
  • Browser : SFSafariViewController
  • Version : App Auth Version 0.92

Additional context

  • This only happens sometimes, but never on Simulator
  • I know SFSafariViewController sets its cookies during the redirect from IDP, but what specific cookies it needs set for SSO to work during the same session, no closing app, no restart, same session.

videoAbyss avatar Nov 14 '19 06:11 videoAbyss

This doesn't appear to be an AppAuth bug to me. Feel free to use this issue to discuss the problem with others, but I can't think of any change in AppAuth that could resolve this. If you've found a bug in iOS itself, then you could consider reporting it to Apple.

WilliamDenniss avatar Nov 19 '19 00:11 WilliamDenniss