Lock.swift: Lock Log in does not work

Issue:

When trying to log in to Auth0 using “Lock” in my Swift App (username-password), i always get an error “WE’RE SORRY, SOMETHING WENT WRONG WHEN ATTEMPTING TO LOG IN”. It has to be a bug in the Lock framework, because Auth0 shows my User after Sign up and is capable of loggin my user in. In addition to that, everything works perfectly well, when using the web login in my app. Just Lock gives me the above mentioned error and does not let me log in. Strange thing is, that logging in via Social Media (i tried Google and Facebook) works fine in Lock as well.

Lock Version:

2.3.1

iOS version:

10.0

Podfile:

platform :ios, '10.0'
inhibit_all_warnings!
use_frameworks!

pod "Apollo"
pod 'SimpleKeychain', '~> 0.8'
target 'ApolloFirstSetup' do
 pod 'Auth0', '~> 1.5'
pod 'Lock', '~> 2.0'

target 'ApolloFirstSetupTests' do
    inherit! :search_paths
    # Pods for testing
  end

target 'ApolloFirstSetupUITests' do
    inherit! :search_paths
    # Pods for testing
  end
end

Code that calls Lock Dashboard in Swift project:

 Lock
            .classic()
            .withOptions {
                $0.scope = "openid profile"
            }
            .withStyle {
                $0.title = "App Name"
            }
            .onAuth { credentials in 
             // app never gets in here
            }
            .onError { [weakSelf = self] error in
                print("Failed with error \(error)")
                // returns "Failed with error couldNotLogin"
            }
            .present(from: self)

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 16 (7 by maintainers)

Most upvoted comments

Sorry, should have said this as well you need to enable the password grant.