简体   繁体   中英

Using Parse and AWS Cognito

I'm using Parse as my backend but I'm also using the AWS s3 service so I need to also use Amazon Cognito. So far Amazon Cognito integrates with 3rd party identity providers such as Facebook, Google, and Twitter but not Parse. So I'm guessing I would use the Basic flow which

"Uses Cognito + STS and requires identity pool plus IAM roles"

https://docs.aws.amazon.com/AWSiOSSDK/latest/Classes/AWSCognitoCredentialsProvider.html#//api/name/getIdentityId

since I'm using Parse as my backend I won't be able to use the Developer authenticated identities method. But I'm not entirely sure.

But my only issue is how I could get session tokens for temporary AWS Service access for users? Most of the tutorials/blogs I find online explain how to access the tokens on the server side but not on ios unless I'm missing a crucial concept here

If you're authenticating users with Parse, you should be able to use Developer Authenticated Identities , having the user send login credentials to your backend which would then validate those with Parse.

The mobile SDKs can get credentials to access AWS resources. These are vended for users based on their state, which is where the roles you mentioned come in. If you log in (with Parse, for example), your credentials would allow you to access what the auth role dictates, but if you don't, they'd be scoped to what the unauth role dictates. The developer guide has more information on getting credentials.

As far as your backend, have you looked into Cognito Sync ? If you have and opted to go with Parse instead, was there a particular feature it was lacking that caused you to not use it?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM