AWS移动集线器登录UI

问题描述 投票:0回答:1

我是AWS移动中心的新手,并且真的很困惑。我在移动集线器中有一个数据库,并且能够访问它。现在我想添加登录视图。我创建了一个池,其中包含一些通过移动集线器输入并集成的用户帐户。我按照AWS中的指南,在viewdidload中调用UI中的构建。运行时,实际会弹出登录UI,并可以检测用户名和密码是否不匹配。但是,我按下登录按钮,没有任何反应,永远留在登录视图上。任何人都熟悉这种情况?

 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.")
                                    }
            })
    }

代表与指南相同

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)
}

}

错误无法获取id

enter image description here

谢谢

ios swift amazon-web-services aws-mobilehub amazon-mobile-hub
1个回答
0
投票

看起来您需要查看Cognito用户/角色策略,问题是您的用户池不支持未经身份验证的访问

© www.soinside.com 2019 - 2024. All rights reserved.