Skip to content

Commit

Permalink
auth0#175 Add arbitrary delay of 1 second before dismissing the contr…
Browse files Browse the repository at this point in the history
…oller. This allows a redirect to the federated logout page to happen before dismissal.
  • Loading branch information
srgray committed Dec 5, 2017
1 parent 5d02e3c commit 3741c9c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Auth0/SilentSafariViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ class SilentSafariViewController: SFSafariViewController, SFSafariViewController
}

func safariViewController(_ controller: SFSafariViewController, didCompleteInitialLoad didLoadSuccessfully: Bool) {
controller.dismiss(animated: false) { self.onResult(didLoadSuccessfully) }
DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(1), execute: {
controller.dismiss(animated: false) { self.onResult(didLoadSuccessfully) }
})
}
}

0 comments on commit 3741c9c

Please sign in to comment.