Amazon Cognito
Create user pools in Floci, add users and app clients, and test sign-in, Lambda triggers and federated sign-in against your app without a real AWS account.
Features
User pools
- List user pools with their pool ID and creation date; find them by name.
- Create user pool with a name, sign-in with username or email (can't be changed later) and auto-verified email.
- Delete one or more pools, with their users, groups, app clients and domains.
- Test sign-in: choose an app client, enter a username and password, set a new password when Cognito asks for one, and see the decoded ID and access tokens (expiry,
cognito:groups, header and payload) with copy buttons for each token and the refresh token. - "Stack: X" link when the pool was created by CloudFormation.
Users
- Users tab: list users with email, status and enabled state; find by username or email and filter by status.
- Create user with username (or email for email sign-in pools), email, verified flag, phone number and temporary password; send the invitation by email and/or SMS.
- Confirm, Enable, Disable and Delete one or more users.
- User page: username,
sub, status, dates, email (with a View emails link to the SES mailbox), phone number (with a View SMS link) and an Email verified toggle. - Set password (permanent or temporary), Confirm sign-up, Reset password, Enable / Disable, Sign out everywhere and Delete.
- Attributes: add, edit and delete user attributes (required ones and
sub/identitiesare protected); federated identities are listed one per line. - Groups: see the user's groups, Add to group and Remove.
Groups
- Groups tab: list groups with description and precedence; find by name or description.
- Create group with a name, optional description and precedence; delete groups.
- Group page: details and members; Add users and Remove users.
App clients
- App clients tab: list clients with client ID and whether they have a secret; find by name or client ID; delete clients.
- Create app client and Edit: name, client secret (none or generated, set at creation), auth flows, callback URLs, sign-out URLs, OAuth flows (authorization code, implicit), OAuth scopes and identity providers.
- Client page: client ID, client secret (show, hide, copy), auth flows and OAuth settings.
- Open hosted UI: choose an identity provider (or the Cognito form) and a callback URL, and open the sign-in page; it redirects to your callback with
?code=. - Connect card with Node.js and Python code that signs a user in with this client.
Identity providers
- Identity providers tab: create and delete the pool's domain; Floci serves the hosted UI on its own URL, so the domain name only needs to exist.
- Create identity provider and edit: OIDC (name, client ID and secret, scopes, issuer, authorize, token, userinfo and JWKS URLs) or Google (client ID and secret, scopes, with the redirect URI to register).
- Attribute mapping from IdP claims to user pool attributes.
Triggers
- Triggers tab: see the Lambda function of each trigger (pre sign-up, post confirmation, pre / post authentication, pre token generation, custom message, custom auth challenge triggers, user migration).
- Edit to choose or remove the function for each trigger. Custom email and SMS senders are shown but not editable.
Details
- Details tab: pool ID, ARN, sign-in attributes, auto-verified attributes, password policy and MFA setting.
- Endpoints: issuer, plus the JWKS and OpenID configuration URLs from your machine and from a container in the compose network.
- Email: send with the Cognito default sender or from an SES email identity, with a from and reply-to address.
Typical workflow
- Open User pools and choose Create user pool.
- On the App clients tab, choose Create app client, keep the default auth flows (they include
ALLOW_USER_PASSWORD_AUTH) and create it. - On the Users tab, choose Create user with an email and a temporary password.
- Choose Test sign-in, pick the app client, sign in with the temporary password and set a new one when asked; check the decoded tokens.
- Copy the code from the app client's Connect card, and point your app's token checks at the issuer and JWKS URL on the Details tab.
Works with
- AWS Lambda: user pool triggers; a function's Triggers tab lists the pools that use it.
- Amazon SES: invitation and verification emails, sent from an SES identity and readable in the SES mailbox.
- Amazon SNS: invitation SMS shows in the SNS SMS view.
- Amazon API Gateway: Cognito user pool authorizers.
- AWS AppSync: run GraphQL queries as a Cognito user.
- AWS CloudFormation: pools created by a stack link to it.
Limitations
- Floci doesn't send real email or SMS: invitations and codes land in the SES mailbox and the SNS SMS view, and any phone number works.
- Reset password moves the user to
RESET_REQUIREDbut Floci 2.4.0 doesn't email a code at this step: use forgot password, and the code arrives in the SES mailbox. - Floci 2.4.0 doesn't call the pre sign-up trigger for a user's first federated sign-in.
- Tokens carry the issuer on your machine's Floci URL even when your app reaches Floci at
floci:4566. Verifyissagainst the issuer shown on the Details tab and fetch keys from the JWKS URL your app can reach. - Floci calls an OIDC provider's token, userinfo and JWKS URLs from inside its container. For an IdP on your machine use
http://host.docker.internal:<port>; the authorize URL opens in your browser, solocalhostworks there. - Deleting an identity provider leaves its name in app clients; remove it on each client's Edit page.
- Deleting a Lambda function leaves it set as a pool trigger, so sign-up and sign-in on that pool fail. Lambda's delete dialog warns about pools that use the function.