openid / openid/AppAuth-iOS

[iOS/iPhone] AppAuth crash when user clicks cancel on privacy pop up.

Open
#595 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Observing on iOS 13 and above devices.

In one scenario where user cancels in the privacy pop up of the web authentication will make the iOS crash. Is there anything can be done in AppAuth to prevent it.

Steps to reproduce the behavior:

  1. Launch AppAuth with the Authentication request using API OIDAuthState.authState(request,ViewController.) which internally calls presentExternalUserAgentRequest and presents privacy pop up. Select the continue.
  2. Keep the browser open(mandatory). And wait untill page loads (optional).
  3. Goto iOS Settings app. Select Safari and Clear history and website data.
  4. Come back to app and observe there is a privacy pop up again with browser open and provide cancel on the privacy pop up.
  5. Observe AppAuth will provide call back and crashes in the process.

Expected behavior
Crash must not happen.

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

Reproduce the crash using OIDAuthState.authState(request,ViewController.) and the presentExternalUserAgentRequest flow, following the listed Safari privacy-pop-up steps on iOS 13 or later. Inspect the callback path after cancellation and verify that repeating the scenario no longer crashes while the authentication callback still completes safely.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, objective-c
Domain
authentication, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.