Overview
Amazon Cognito is a user identity and authentication service from AWS that handles registration, login, session management, and federated authentication for web and mobile applications. When detected on a website, it indicates the site uses Cognito to manage user accounts, authenticate sessions, and potentially federate login through social identity providers like Google, Facebook, or Apple.
What This Script Does
Amazon Cognito loads the AWS Amplify authentication libraries or the standalone Cognito Identity SDK, typically from cognito-idp.{region}.amazonaws.com and cognito-identity.{region}.amazonaws.com endpoints. The SDK manages the complete authentication lifecycle:
- User registration — Collects username, password, and required attributes; sends them to Cognito User Pools for account creation with server-side password hashing
- Authentication — Handles Secure Remote Password (SRP) protocol exchange for login, returning JWT tokens (ID token, access token, refresh token)
- Session management — Stores JWT tokens in the browser, typically using
localStorageunder keys prefixed withCognitoIdentityServiceProvider.{clientId}containing the ID token, access token, refresh token, and user metadata - Token refresh — Automatically refreshes expired access tokens using the stored refresh token, maintaining seamless authenticated sessions
- MFA — Supports TOTP and SMS-based multi-factor authentication flows
- Federation — Redirects to external identity providers (Google, Facebook, Apple, SAML) and processes OAuth callback tokens
Storage used includes:
localStorageentries underCognitoIdentityServiceProvider.*— storing JWT tokens (ID, access, refresh) and last authenticated user metadata; tokens typically expire in 1 hour (access/ID) with refresh tokens valid for 30 dayslocalStorageentries underaws.cognito.identity-*— storing Cognito Identity Pool credentials for AWS service access
Cognito does not set advertising cookies, track browsing behavior, or share data with third parties. All data processing is scoped to the website's own user authentication and session management. Network requests go only to AWS Cognito service endpoints within the configured AWS region.
Consent & Compliance
Amazon Cognito is classified as essential. It is an authentication and identity management service — core infrastructure required for users to log in, maintain sessions, and access protected content.
Under the GDPR, processing authentication data has a clear legal basis in contract performance (Article 6(1)(b)). Users who create accounts and log in are explicitly engaging with the service, and processing their credentials and session data is necessary to deliver that service. User pool data (email, phone, custom attributes) must be covered in the website's privacy notice.
Under the ePrivacy Directive, the JWT tokens and session data stored in localStorage are strictly necessary for a service explicitly requested by the user (logging in and maintaining their session). Article 5(3) exempts such storage from consent requirements.
Under CCPA/CPRA, Cognito processes personal information (user credentials, identity tokens) solely for authentication purposes. AWS acts as a service provider under the website operator's DPA. No personal information is sold or shared for advertising.
Should You Block This Without Consent?
No. Amazon Cognito is authentication infrastructure. Blocking it would prevent users from logging in, registering accounts, and maintaining sessions — fundamentally breaking the website's user access system. It stores only authentication tokens, performs no tracking, and has no advertising function.
Consent Categories
Also Known As
Industries
Tracked Domains (2)
amazonaws.comEssentialcognito-identity.amazonaws.comEssentialFrequently Asked Questions
Does Amazon Cognito require cookie consent?
No. Amazon Cognito is essential authentication infrastructure. It stores JWT tokens in localStorage for session management — processing users explicitly trigger by logging in. GDPR Article 6(1)(b) covers it under contract performance; ePrivacy exempts its session storage as strictly necessary.
What does Amazon Cognito store in the browser?
Cognito stores JWT tokens in localStorage under keys prefixed with CognitoIdentityServiceProvider.[clientId], including ID token, access token (1-hour expiry), and refresh token (30-day expiry). Identity pool credentials are stored under aws.cognito.identity-* keys. No advertising cookies are set.
How does ConsentStack treat Amazon Cognito?
ConsentStack classifies Amazon Cognito as essential and never blocks it. Authentication tokens stored by Cognito are exempt from consent requirements because they are strictly necessary for users to access the service they requested. ConsentStack does not interfere with Cognito login flows.
Related Vendors
Manage consent for Amazon Cognito
ConsentStack automatically detects and manages Amazon Cognito trackers so your site stays compliant with global privacy regulations.