
上QQ阅读APP看书,第一时间看更新
Amazon Cognito
Handling authentication in a secure way is a complex problem, but this use case is so common that many frameworks and services were built dedicated to solve it. Nowadays, you just need to copy a few lines of code and you are good to go.
Cognito is Amazon's solution for this problem. More than solving how you authenticate accounts, it provides an easy way to sync data between different devices. When you log in using a Cognito account, you receive a temporary AWS token that is used to store and retrieve data specific to the user, like preferences, user profile, or saved game data.
We'll explore more about this service through code examples in Chapter 8, Securing the Serverless Application.