[iOS] AppAuth crash when user clears Safari history mid-session
Nobody has claimed this yet.
- 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:
- Start a
OIDExternalUserAgentSession, using for example:OIDAuthState.authState(...) - Switch to iOS Safari Settings, clear history and website data — closing all tabs
- Return to app
- Hit cancel on the alert that displays
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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