openid / openid/AppAuth-iOS

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

Open
#927 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug triage
Dominant language
Objective-C
Stars
2k
Forks
867
Avg merge
4d 48m
Merged PRs (30d)
1

Description

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".

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the OIDExternalUserAgentSession and ASWebAuthenticationSession handling described in the issue, then reproduce the flow by clearing Safari history mid-session and cancelling the alert. Done means the alert dismisses without a crash after the authentication session is interrupted.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, objective-c
Domain
authentication, mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.