flutter_web_auth icon indicating copy to clipboard operation
flutter_web_auth copied to clipboard

Support Add to Existing App use case

Open junying1 opened this issue 4 years ago β€’ 4 comments

The current implementation assumes the plugin is used in a pure Flutter app. It casts the app's rootViewController to FlutterViewController.

This supports using this plugin in an "add to app" use case. The implementation does not assume the rootViewController is an instance of FlutterViewController, but rather starts with the presented view controller, and navigates up the stack to the root controller. It also handles in the case of a non-modal screen, in which case it would be a UINavigationController. We could probably just use the presented view controller, rather than navigating up the stack to the root to use as the session context provider.

junying1 avatar Apr 09 '21 20:04 junying1

Sorry for the slow review on this one πŸ™ˆ

Would you be able to tell me how to test this out? Would be perfect if you have an example project that demonstrates the problem ☺️

LinusU avatar Sep 07 '21 13:09 LinusU

Sorry for the slow review on this one πŸ™ˆ

Would you be able to tell me how to test this out? Would be perfect if you have an example project that demonstrates the problem ☺️

I don't have a readily available public project for you to test. You need to create a Flutter module that uses the plugin, then create a natives iOS project to embed the Flutter module. If you have a project you use to test this plugin you can turn it into a module and embed in a Xcode project. The instruction is here: https://flutter.dev/docs/development/add-to-app/ios/project-setup. I have my version running in 2 commercial projects.

junying1 avatar Sep 08 '21 13:09 junying1

Just some small changes, otherwise looks great πŸ‘

I understand if you don't have the motivation to work on this since I've been so slow to respond, sorry about that! I'll try to apply the suggested changes myself and merge this if you don't feel like it ☺️

LinusU avatar Dec 11 '21 11:12 LinusU

Just some small changes, otherwise looks great πŸ‘

I understand if you don't have the motivation to work on this since I've been so slow to respond, sorry about that! I'll try to apply the suggested changes myself and merge this if you don't feel like it ☺️

Thanks for reviewing. I agree with the changes. I actually had to change my computer so don't have this repo readily available. If you get to it before I do please go ahead and change and merge! Appreciate it.

junying1 avatar Dec 12 '21 22:12 junying1

A version of this was merged in https://github.com/LinusU/flutter_web_auth/pull/106 πŸŽ‰

LinusU avatar Nov 01 '22 09:11 LinusU