How logIn user after Sign up?

I am struggling with sign implementation (after sign up), constantly get as error The operation couldn’t be completed. ( error 3.). Could you help with this issue?
The flow is as follows:
When users press on “Sign up” on the start screen we should open the free registration page in the browser for them. Users will continue their registration in the browser and at some point we will show them deep links which will bring them back to the app.

    fileprivate func login(connection: String? = nil, loginHint: String? = nil) {
        let mfa = UserDefaults.standard.bool(forKey: UserDefautsConstants.useMFA) ? "offline_access require:mfa" : "offline_access"
        var authService = Auth0.webAuth(clientId: NetworkManager.shared.authClientID, domain: NetworkManager.shared.authDomain)
            .scope("openid profile \(mfa)")

        if let connection = connection {
            authService = authService.connection(connection)
        if let loginHint = loginHint {
            authService = authService.parameters([Constants.Strings.loginHintKey : loginHint])
        authService.start { [weak self] result in
            DispatchQueue.main.async {
                switch result {
                case .success(let credentials):
                case .failure(let error):
                    self?.controller?.show(alertWithMessage: "Failed with error: \(error.localizedDescription)", andTitle: Constants.Strings.errorTitle)

If users used login/password to register, we will show them a different deep link: <CUSTOM_PROTOCOL>://login/email?email=<USER_EMAIL>
USER_EMAIL is the email that user used when registering
When native app intercepts this link, It calls auth0 sdk without specifying connection, but setting login_hint param to USER_EMAIL. This in theory should return access token and we can load the app. But it doesn’t work as expected.