Skip to content

Conversation

@JLavat
Copy link

@JLavat JLavat commented Jan 15, 2026

AppAuth Flutter plugin is currently using rootViewController as presentingViewController when it needs to present a ViewController (SafariVC) for authentication.

If there is some additional ViewController being presented on top of the root FlutterViewController, then the presentation will fail. In this case, using rootViewController will return the root, i.e. FlutterViewController, whose view is NOT in the window hierarchy because there is another viewController presented on top of it, then the system will raise the following error:

Attempt to present UIViewController on UIViewController whose view is not in the window hierarchy.

To avoid this issue, at any time, when needing to present a ViewController, we should instead retrieve and use the topMost viewController.

Jean Lavat and others added 3 commits January 15, 2026 16:54
…atch-appauth-activity-result

[flutter_appauth] fix: rely on transparent IntentLauncherActivity to catch AppAuth activity result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant