JWT SSO With Cognito
Summary: Community_Admin provides an overview of Amazon Cognito, explaining its two main components: user pools, which allow for sign-up and sign-in options, and identity pools, which grant access to AWS services. They discuss the challenge of maintaining user state in HTTP, a stateless protocol, and propose using JSON Web Tokens (JWT) to address this. The process involves an Angular app receiving a JWT from a backend which is then used for authentication in subsequent requests.
Amazon Cognito provides authentication, authorization, and user management for your web and mobile apps. Your users can sign in directly with a user name and password, or through a third party such as Facebook, Amazon, Google or Apple.
The two main components of Amazon Cognito are user pools and identity pools. User pools are user directories that provide sign-up and sign-in options for your app users. Identity pools enable you to grant your users access to other AWS services. You can use identity pools and user pools separately or together.
Authentication typically consists of a user entering using a username or email and a password and then being granted access to different resources or services.
Authentication, by its very nature, relies on keeping the state of the User. This seems to contradict a fundamental property of HTTP, which is a stateless protocol.
JSON Web Token (JWT) provides a way to solve this issue. Your Angular app can talk to a backend that produces a token. The Angular app can then pass that token in an Authorization header to the backend to prove they are authenticated and needs access to the particular route or resources. The backend should verify the JWT and grant access based on its validity.
javiortizklym
Hmm tks, but I got a question, finally Can make the integration with aws cognito bypassing the sso login in the iframe case?