Amplify-ios: ShowSignInWebView calls completion before the SafariViewController is dismissed

Created on 7 Oct 2020  路  5Comments  路  Source: aws-amplify/amplify-ios

Describe the bug
When you call showSignInWebView, the completion is called before the safari view controller finished dismiss

To Reproduce
Steps to reproduce the behavior:
private func showSignInWebView(window: UIWindow,
request: AuthWebUISignInRequest,
completionHandler: @escaping (Result) -> Void)

Completion on this method is called before the safari view controller finished the dismiss.

Expected behavior
The completion should be called only after the call to navController.dismiss(animated: false) is completed.

Environment(please complete the following information):

  • Amplify Framework Version: 1.1.2
  • Dependency Manager: Cocoapods
  • Swift Version : 5.2

Device Information (please complete the following information):

  • Device: NA
  • iOS Version: iOS 12,13,14
  • Specific to simulators:
auth bug pending release

All 5 comments

Hey @ovidiuadorian-yonder, 1.4.0 was released and contains the fix to this issue.

Hi,

Does this applies to Amplify.Auth.signOut too? I'm trying to navigate to another tab right after I signout but any operation on the presenting view controller is still targeting the Safare web view.

SignOut seemed to work fine for me. The problem was only at sign-in

Yeah I'm still noticing this on 1.4.1

Right after the completion for Amplify.Auth.signOut is called, the top view controller is still safari
image

Was this page helpful?
0 / 5 - 0 ratings