WordPressAuthenticatorDelegate: Allow insertion of a View Controller in the navigation stack in the completion block for shouldPresentUsernamePasswordController
ctarda opened this issue · 0 comments
ctarda commented
We want to be able to provide an optional UIViewController as a third parameter to the completion closure of shouldPresentUsernamePasswordController
The goal is to provide a way for client apps to customise the UI after a login with site address has been completed, adding a third option to the current navigation options (showSelfHostedUsernamePassword and showWPUsernamePassword). This, for example, would help with the implementation of woocommerce/woocommerce-ios#3161
This seems like it might require a breaking change to the WordPressAuthenticationDelegate API. If that's the case, it would require updating client apps.
Expected changes:
- Add the parameter to the completion block of shouldPresentUsernamePasswordController
- Update SiteAddressViewController in a way that if a View Controller is provided (and if other state flags match), navigate to the View controller provided.