Skip to content

[iOS] AppAuth crash when user clears Safari history mid-session #927

@willperkins

Description

@willperkins

Describe the bug
App crashes if clearing Safari history while in an authentication session.

To Reproduce
Steps to reproduce the behavior:

  1. Start a OIDExternalUserAgentSession, using for example: OIDAuthState.authState(...)
  2. Switch to iOS Safari Settings, clear history and website data — closing all tabs
  3. Return to app
  4. Hit cancel on the alert that displays
  5. App will crash

Expected behavior
Alert dismisses

Environment

  • Device: iOS simulator, iOS devices
  • OS: iOS13+
  • Browser: Safari

Additional context
It looks like this is a known issue in ASWebAuthenticationSession. See radr: https://openradar.appspot.com/FB12132525

A potential mitigation is to "retain the authentication session until after the dismiss animation is complete".

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugtriageIssues that need to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions