how to use AWS cognito with custom authentication to create temporary s3 upload security token

徘徊边缘 提交于 2019-12-03 07:58:29

You can find an example in this AWS Mobile blog post and the differences between developer authenticated identities and regular identities in this other blog post.

Basically, the flow is that your app will authenticate against your backend, then your backend will call GetOpenIdTokenForDeveloperIdentity and send the resulting token and Identity ID to the user's app. The user's app can use this token to obtain Cognito credentials using the SDK, and with this credentials make calls to S3 or other AWS services. Each user will have its own credentials, so they only have access to their own resources in S3.

About STS, that's what the SDK will internally use to obtain the credentials, but as long as you use the SDK you don't need to worry about it. It's not an alternative to Cognito, but they both work together.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!