Amazon Cognito

Amazon Cognito

Amazon Cognito is a user authentication and identity management service from AWS. Scripts load the Cognito SDK to handle user registration, login, multi-factor authentication, and OAuth federation with social identity providers. Stores JWT tokens and session cookies in the browser to maintain authenticated state across page navigation and app sessions.

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:

  1. User registration — Collects username, password, and required attributes; sends them to Cognito User Pools for account creation with server-side password hashing
  2. Authentication — Handles Secure Remote Password (SRP) protocol exchange for login, returning JWT tokens (ID token, access token, refresh token)
  3. Session management — Stores JWT tokens in the browser, typically using localStorage under keys prefixed with CognitoIdentityServiceProvider.{clientId} containing the ID token, access token, refresh token, and user metadata
  4. Token refresh — Automatically refreshes expired access tokens using the stored refresh token, maintaining seamless authenticated sessions
  5. MFA — Supports TOTP and SMS-based multi-factor authentication flows
  6. Federation — Redirects to external identity providers (Google, Facebook, Apple, SAML) and processes OAuth callback tokens

Storage used includes:

  • localStorage entries under CognitoIdentityServiceProvider.* — 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 days
  • localStorage entries under aws.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.

Is Amazon Cognito GDPR compliant?

Amazon Cognito's trackers are classified as essential (strictly necessary), so they are generally exempt from prior consent under the GDPR. You should still list them in your cookie policy and privacy notice so visitors know they are there.

Visit website

Consent Categories

Also Known As

AWS CognitoCognito user poolsCognito identity poolsAWS authenticationAmazon user auth

Industries

E-commerce and Shopping

Tracked Domains (2)

amazonaws.comEssential

amazonaws.com is an essential domain operated by Amazon Cognito, used to keep the site working, including security, load balancing, and sessions.

cognito-identity.amazonaws.comEssential

cognito-identity.amazonaws.com is an essential domain operated by Amazon Cognito, used to keep the site working, including security, load balancing, and sessions.

Frequently Asked Questions

Related Vendors

Amazon Attribution
Amazon Attribution
Amazon Attribution is a measurement and analytics solution that helps advertisers understand how non-Amazon marketing channels drive sales on Amazon. Tracking pixels and tags fire on advertiser websites to capture click and conversion events, attributing customer journeys from external ads to Amazon purchases. Sets cookies for cross-site attribution tracking.
Amazon DSP
Amazon DSP
Amazon DSP (Demand-Side Platform) is Amazon's programmatic advertising platform for buying display, video, and audio ads across Amazon properties and third-party sites. Tracking pixels fire on advertiser websites to measure conversions and build retargeting audiences. Sets cookies for cross-site user identification and campaign attribution reporting.
Amazon Pay
Amazon Pay
Amazon Pay is a digital payment service that lets customers check out on third-party websites using their Amazon account credentials. Scripts load the Amazon Pay button and wallet widget, handle address and payment selection, and process transactions through Amazon's payment infrastructure. Stores session cookies to maintain checkout state and authentication.
Sign in with Apple
Sign in with Apple
Sign in with Apple is an OAuth-based authentication service that lets users log into websites using their Apple ID with built-in privacy features. Scripts load the Apple authentication button and handle secure token exchange. Supports email relay to hide user email addresses from websites, and stores session tokens to maintain login state.
Apple Pay
Apple Pay
Apple Pay is a digital payment service that enables secure checkout on websites through Safari and supported browsers. Scripts load the Apple Pay button, present the payment sheet, and process tokenized card transactions without exposing raw payment details to the merchant. Handles biometric authentication via Touch ID or Face ID for payment authorization.
AWS CloudFront
AWS CloudFront
AWS CloudFront is Amazon's content delivery network that caches and serves website assets from edge locations worldwide. It delivers HTML, CSS, JavaScript, images, video, and API responses from the nearest point of presence to reduce latency. Operates as transparent infrastructure with no advertising or behavioral tracking — purely accelerates content delivery.

Manage consent for Amazon Cognito

ConsentStack automatically detects and manages Amazon Cognito trackers so your site stays compliant with global privacy regulations.