How to navigate to view controller after successful verification?



I’m using Digits - by Twitter API for phone number verification, a quick scenario: user tap on Sign Up buttonex: LoginViewController -> Digits API initialize to verify his phone number -> after successfully verification the app should move to next View Controller ex: HomeViewController but what happens is when the user is successfully verified the app returns to previous which is LoginViewController ! here is my code:


@IBAction func signUpPressed(_ sender: Any) {

    let configuration = DGTAuthenticationConfiguration(accountFields: .defaultOptionMask)

    configuration?.appearance = DGTAppearance()
    configuration?.appearance.backgroundColor = UIColor.white
    configuration?.appearance.accentColor =

    // Start the Digits authentication flow with the custom appearance.
    Digits.sharedInstance().authenticate(with: nil, configuration:configuration!) { (session, error) in
        if session != nil {

            //Print Data

            // Navigate to the main app screen to select a theme.
            self.performSegue(withIdentifier: "toSignUpVC", sender: self)

        } else {


Example of Storyboard:

NOTE: after the App returns to LoginViewController I can go to SignUpViewController successfully after I tap the SignUp Button again, because Digits registered the device in the first time, so why doesn’t Digits move to the next View Controller instead of going back to LoginViewController, any user will never know if he was successfully signed up or not !

and I asked the question on StackOverFlow with Fabric tags for 10 days now and I got no answer so I thought maybe I should post it here since StackOverFlow fabric tags doesn’t get enough attention