Dosu LogoDosu Logo
Ask
Join our Discord
StrapiPublic
Strapi
DocumentsStrapi
aws-cognito
aws-cognito
Type
External
Status
Published
Created
Mar 5, 2026
Updated
Jun 29, 2026
Updated by
Dosu Bot
Source
View

import ConfigDone from '/docs/snippets/u-and-p-provider-config-done.md'

AWS Cognito provider setup for Users & Permissions#

AWS Cognito provider lets you set up OAuth 2.0 authentication for Users & Permissions by configuring a user pool in AWS and adding the client credentials and domain to Strapi's provider settings.

The present page explains how to setup the AWS Cognito provider for the Users & Permissions feature.

You have read the Users & Permissions providers documentation.

AWS Cognito configuration#

Info

AWS Cognito accepts the localhost urls.

The use of ngrok is not needed.

  1. Visit the AWS Management Console
  2. If needed, select your Region in the top right corner next to the Support dropdown
  3. Select the Services dropdown in the top left corner
  4. Click on Cognito in the Security, Identity & Compliance section
  5. Then click on the Manage User Pools button
  6. If applicable either create or use an existing user pool. You will find hereafter a tutorial to create a User Pool
  7. Go to the App clients section in your cognito user pool and create a new client with the name Strapi Auth and set all the parameters and then click on Create app client
  8. You should now have an App client id and by clicking on the button Show Details you will be able to see the App client secret. Do copy those two values App client id and App client secret somewhere for later use when configuring the AWS Cognito provider in Strapi.
  9. Go to the App integration section and click on App client settings
  10. Look for your app client named Strapi Auth and enable Cognito User Pool by checking it in the Enabled Identity Providers section of your newly created App client
  11. Fill in your callback URL and Sign out URL with the value http://localhost:1337/api/connect/cognito/callback or the one provided by your AWS Cognito provider in Strapi
  12. In the Oauth 2.0 section select Authorization code grant and Implicit grant for the Allowed OAuth Flows and select email, openid and profile for the Allowed OAuth Scopes
  13. You can now click on Save changes and if you have already configured your domain name then you should be able to see a link to the Launch Hosted UI. You can click on it in order to display the AWS Cognito login page. In case you haven't yet configured your domain name, use the link Choose domain name at the bottom right of the page in order to configure your domain name. On that page you will have an Amazon Cognito Domain section where a Domain prefix is already setup. Type a domain prefix to use for the sign-up and sign-in pages that are hosted by Amazon Cognito, this domain prefix together with the .auth.YOUR_REGION.amazoncognito.com will be the Host URI (Subdomain) value for your strapi configuration later on.

Strapi configuration#

  1. Visit the User & Permissions provider settings page at
  2. Click on the Cognito provider
  3. Fill the information (replace with your own client ID and secret):
    • Enable: ON
    • Client ID: fill in the App client id (5bd7a786qdupjmi0b3s10vegdt)
    • Client Secret: fill in the App client secret (19c5c78dsfsdfssfsdfhpdb4nkpb145vesdfdsfsffgh7vwd6g45jlipbpb)
    • Host URI (Subdomain): fill in the URL value that you copied earlier (myapp67b50345-67b50b17-local.auth.eu-central-1.amazoncognito.com)
    • The redirect URL to your front-end app: if you are using strapi react-login use http://localhost:3000/connect/cognito/redirect but if you do not yet have a front-end app to test your Cognito configuration you can then use the following URL http://localhost:1337/api/auth/cognito/callback
Documents
Admin Form Validation
Admin Homepage Date Serialization
Admin Modal Management
Admin Panel Locale Management
admin-panel
internationalization
setting-up-admin-panel
Auth Error Classification
AWS S3 Upload Provider
amazon-s3
media-library
Blocks Editor URL Validation
Content Manager List Configuration
Content Manager Mobile Actions Drawer
Content Manager Pagination
Content Manager Query Persistence
Content Manager RBAC
rbac
Content Manager Save State
Content Manager Status Attributes
Content Manager URL & Filter State
admin-panel-api
Content Releases
Data Transfer Streaming
Database Migration Concurrency and Idempotency
deployment
step-by-step
Date Field Serialization
Directory Export
Discard-Drafts Migration
Document ID Migration
document-service
introduction-and-faq
step-by-step
Document Service Clone & Relation Handling
Document Service Input Types
Document Service Populate Concurrency
Document Service Relation Queries
Draft & Publish Relation Synchronization
do-not-update-repeatable-components-with-document-service-api
lifecycle-hooks-document-service
publishedat-always-set-when-dandp-disabled
relations
status
status
DynamicZone Stability
components-and-dynamic-zones-do-not-return-id
components-dynamic-zones
no-shared-population-strategy-components-dynamic-zones
Enterprise License Validation
Entity String Length Validation
Error Class Identity
GraphQL Abort Signal Propagation
GraphQL Filter Pipeline
i18n Locale Validation
locale
locale
i18n Locale-Scoped Operations
crud
database-columns
document
i18n-content-manager-locale
internationalization
locale
locale
locale
no-locale-all
relations
Koa Type Augmentation
MariaDB Schema Synchronization
Media Library Asset Replace
media-library
Media Library Permissions
Media Library Thumbnails
Monorepo Module Resolution
Nested Relation Modal Navigation
OpenAPI Specification Generation
Polymorphic Relations
populate
Private Attribute Populate Validation
Query Builder Parameter Handling
Relation Modal State Management
relations
Relations Field Ordering & Pagination
Remote Asset Export
Rich Text Blocks Validation
Strapi Admin Module Loading
Strapi Attribute Typing
Strapi Content Publishing
content-manager
draft-and-publish
internationalization
parameters
releases
Strapi Data Transfer
deployment
Strapi Project Scaffolding
cli
create-a-plugin
deployment
How can I create my first Strapi project on a brand new MacBook with no prior coding experience, including all necessary terminal commands and setup steps?
quick-start
templates
Strapi TypeScript Build Performance
Strapi v5 Plugin API
admin-panel-rbac-store-updated
admin-permissions-for-plugins
breaking-changes
get-where-removed
helper-plugin
helper-plugin-deprecated
inject-content-manager-component
introduction
model-config-path-uses-uid
pass-data-from-server-to-admin
plugins-migration
rbac
redux-content-manager-app-state
remove-webhook-populate-relations
strapi-imports
Transaction Callback Promise Handling
Upload Storage Consistency
Users & Permissions OAuth Flow
new-provider-guide
users-permissions
Users-Permissions Cookie Authentication
Users-Permissions Session Management
Vite Build Configuration
vite
webpack-aliases-removed
Content Manager Mobile and Tablet UI Improvements
FilesManager API Reference
Focal Point Picker in Strapi Media Library
Nested Route File Structure for Strapi Plugins
Plugin-Specific Handling in the Strapi JavaScript Client
Strapi SDK Initialization and Architecture Guide
access-cast-environment-variables
access-configuration-values
adding-support-to-existing-project
admin-panel
admin-panel-customization
advanced-policies
advanced-queries
api
api-tokens
attributes-and-content-types-names-reserved
audit-logs
auth-zero
authentication
aws-cognito
backend-customization
bulk-operations
bundlers
cas
cli
client
cloudinary
community
configurations
configure-sso
content-api
content-history
content-manager-apis
content-type-builder
controllers
core-service-methods-use-document-service
create-components-for-plugins
cron
custom-fields
customization
data-management
database
database-identifiers-shortened
database-migrations
database-transactions
default-index-removed
default-input-validation
design-system
developing-plugins
development
discord
discord
docker
documentation
documents-and-entries
edit-view-layout-and-list-view-layout-rewritten
email
email-custom-providers
email-nodemailer
entity-service
entity-service-deprecated
environment
error-handling
examples
extension
facebook
faq
favicon
features
fetch
fields
filter
filtering
filters
filters
from-entity-service-to-document-service
functions
github
github
google
google
graphql
graphql
graphql-api-updated
guides
homepage
host-port-path
instagram
installation
installing-plugins-via-marketplace
interactive-query-builder
intro
intro
is-supported-image-removed
keycloak
keycloak
koa-body-v6
license-only
linkedin
local-upload
locales-translations
logos
mailgun-provider-variables
media-library-providers
microsoft
middlewares
middlewares
middlewares
middlewares
models
mysql5-unsupported
new-response-format
no-find-page-in-document-service
no-upload-at-entry-creation
okta
only-better-sqlite3-for-sqlite
only-mysql2-package-for-mysql
openapi
order-pagination
order-pagination
patreon
plugin-sdk
plugin-structure
plugins
plugins-extension
policies
policies
populate
populate-creator-fields
populate-select
populating
preview
project-structure
publication-state-removed
query-engine
react-router-dom-6
reddit
register-allowed-fields
removed-support-for-some-env-options
requests-responses
rest
review-workflows
routes
routes
sentry
server
server-api
server-default-log-level
server-proxy
services
services-and-controllers
setup-deployment
single-operations
sort-by-id
sort-pagination
sort-pagination
sso
store-and-access-data
strapi-container
strapi-utils-refactored
strict-requirements-config-files
templates
testing
theme-extension
twitch
twitter
typescript
typescript
understanding-populate
upgrade-to-apollov4
upgrade-tool
upgrades
upload
usage-information
use-document-id
users-and-permissions-providers
vk
webhooks
wysiwyg-editor
yarn-not-default