简体   繁体   English

使用iOS SDK Cognito Lambda和DynamoDB为AWS iOS创建用户/开发人员定义的登录

[英]Creating a user/developer defined login for AWS iOS using iOS SDK Cognito Lambda and DynamoDB

I am trying to figure out if this is the "proper"/current/correct flow for developing a user/developer defined login credential for iOS using AWS. 我试图弄清楚这是否是使用AWS为iOS开发用户/开发人员定义的登录凭证的“正确”/当前/正确流程。

(I am migrating from Parse to AWS so only been reading AWS for a week). (我正在从Parse迁移到AWS,所以只读了AWS一周)。

  1. Download, install, and build an iOS app for registering users (say email and password (this is done and the app shows a UITextField for email and password and accessible in the UIViewController)). 下载,安装和构建用于注册用户的iOS应用程序(例如电子邮件和密码(已完成,应用程序显示UITextField,用于电子邮件和密码,可在UIViewController中访问))。 Also iOS SDK via Cocoapods is installed and available. 此外,iOS SDK也通过Cocoapods安装并可用。
  2. Create an identity pool with an unauth and auth roles that access the different services. 使用访问不同服务的unauth和auth角色创建标识池。 So unauth technically will access what they need. 所以unauth在技术上会获得他们需要的东西。 Unauth accesses DynamoDB full access and Cognito. Unauth访问DynamoDB完全访问权限和Cognito。 Auth adds in s3 and sns. Auth在s3和sns中添加。 This is done. 这个完成了。 Does Lambda needed to be added? Lambda是否需要添加? (all set up in IAM and Cognito). (全部在IAM和Cognito中设置)。
  3. Use Lambda to create functions to be called from the iOS device to see if a user is register in DynamoDB. 使用Lambda创建要从iOS设备调用的函数,以查看用户是否在DynamoDB中注册。
  4. If user is registered and matched against Lambda's call to DynamoDB, use Cognito to switch from unauth role to auth. 如果用户已注册并与Lambda对DynamoDB的调用进行匹配,请使用Cognito从unauth角色切换到auth。
  5. Now user is authenticated and can get access to S3, SNS and other service. 现在用户已通过身份验证,可以访问S3,SNS和其他服务。

Is there a better way to do this? 有一个更好的方法吗? Is this secure? 这样安全吗? Have a little trouble with steps 3 to 5. 步骤3到5有点麻烦。

Since you are calling Lambda function from the app, you need to add permission for that in IAM. 由于您从应用程序调用Lambda函数,因此需要在IAM中为其添加权限。 Your flow looks good, just make sure you are calling GetOpenIdTokenForDeveloperIdentity from your Lambda function. 您的流程看起来不错,只需确保从Lambda函数调用GetOpenIdTokenForDeveloperIdentity You might want to look into this project for references. 您可能希望查看此项目以获取参考。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从未认证切换到经过开发人员认证的Cognito用户-AWS iOS SDK - Switch from unauth to developer authenticated cognito user - AWS iOS SDK AWS iOS SDK Cognito开发人员身份验证(Swift) - AWS iOS SDK Cognito Developer Authentication (Swift) 使用AWS Cognito开发者身份从我的ios应用程序获得对DynamoDB的完全访问权限 - Getting full access to DynamoDB from my ios app using AWS Cognito Developer Identities AWS-通过用户池进行的Cognito登录和Cognito身份验证[iOS] - AWS - Cognito Login by User Pool, and Cognito Authentication[iOS] 如何使用iOS SDK使用Facebook身份验证使用DynamoDB和Cognito存储用户信息 - How to store user information with DynamoDB and Cognito using Facebook authentication with iOS SDK 使用AWS Cognito保持用户在ios中的登录状态 - Using AWS Cognito to keep a user in ios logged in Amazon Cognito开发人员使用iOS SDK验证了身份 - Amazon Cognito developer authenticated identity with iOS SDK AWS Cognito登录在iOS中将AuthFlow设置为USER_PASSWORD_AUTH - AWS cognito login set AuthFlow to USER_PASSWORD_AUTH in iOS AWS Cognito iOS开发人员身份验证身份 - AWS Cognito iOS Developer Authenticated Identities 使用 AWS Cognito 在 iOS 应用程序中获取描述性登录错误消息 - Getting descriptive login error messages in iOS app using AWS Cognito
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM