I am newbie for the AWS mobile hub, and really confused with it. I have a database in the mobile hub , and is able to access it. And now I want to add the login view. I have created the pool with a few user account inputted through the mobile hub and integrated. I follow the guide in the AWS , call the build in UI in the viewdidload. When running , the login UI actually pop up , and can detect if the user name and password is not match. However , I pressed the login button , nothing happen, stay on the login view forever. Any one is familiar with this situation ?
if !AWSSignInManager.sharedInstance().isLoggedIn {
AWSAuthUIViewController.presentViewController(with: self.navigationController!,
configuration: nil,
completionHandler: { (provider: AWSSignInProvider, error: Error?) in
if error != nil {
print("Error occurred: \(String(describing: error))")
} else {
print("Sign in successful.")
}
})
}
delegate is same with the guide
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, open url: URL,
sourceApplication: String?, annotation: Any) -> Bool {
return AWSMobileClient.sharedInstance().interceptApplication(
application, open: url,
sourceApplication: sourceApplication,
annotation: annotation)
}
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions:
[UIApplicationLaunchOptionsKey: Any]?) -> Bool {
return AWSMobileClient.sharedInstance().interceptApplication(
application, didFinishLaunchingWithOptions:
launchOptions)
}
}
error can not get id
Thanks
Looks like you need to take a look at your Cognito user / role policies, The problem is your user pool doesn't support unauthenticated access