triauth for Amazon CognitoOIDC
Let the people at your domain sign in to every app behind your Cognito user pool with one approval on their own device.
- Sign-in through
- OpenID Connect bridge
- Available in
- Every user pool
- Set up in
- User pool › Social and external providers
About Amazon Cognito
Amazon Cognito is the sign-in service of AWS. A user pool is a hosted user directory with a login page that apps send their users to, and it can forward the sign-in to an outside identity provider and hand the app its own tokens. The app only ever talks to Cognito.
Connect Amazon Cognito to triauth
A user pool signs people in through the triauth OpenID Connect bridge, as an OpenID Connect identity provider. Once connected, the pool's login page shows a button for it. People at your domain click it, type their username, and approve on their own device, and Cognito signs them into the app. Nobody keeps a password in the pool, and when someone leaves, removing their identity records at your domain ends their access to every app behind it.
How it works
Open oidc.triauth.org and enter your domain. Paste the pool's redirect address,
https://example.auth.eu-central-1.amazoncognito.com/oauth2/idpresponsewith your own pool domain in place ofexample.auth.eu-central-1.amazoncognito.com, and click Connect app. The bridge gives you a client ID and a client secret.In the Cognito console, open your user pool, then Social and external providers › Add an identity provider › OpenID Connect, and fill in the fields below with your domain in place of
example.com.Field Value Provider name triauthClient ID and Client secret from the bridge Authorized scopes openid email profile groupsAttribute request method GET Setup method Auto fill through issuer URL, with https://oidc.triauth.org/example.comAttribute mapping emailfromemail,email_verifiedfromemail_verified,namefromnameOpen the app client, and under Login pages › Managed login pages configuration add the new identity provider.
Open the app's login page and click the
triauthbutton.
Checkpoint
The pool's login page shows a button for the new provider. Choosing it opens a page from the bridge that asks for the username, and the person's authenticator asks them to approve. Cognito then returns the app its own tokens.
Good to know
- Everyone with an identity at your domain gets a profile in the pool the first time they sign in, named
triauth_followed by their identifier. To let only one team in, limit the app to a group when you connect it. - The groups published at your domain can be mapped to a custom attribute of the pool, as one bracketed list. Cognito's own groups are assigned by your app or a Lambda trigger.
- People who sign in through an outside provider are counted separately from direct sign-ins in Cognito's pricing, with a free allowance each month.
For the person who connects the app
| Setting | Value |
|---|---|
| Redirect address | https://<your pool domain>/oauth2/idpresponse, on the prefix domain or on a custom domain |
| Where in Cognito | the user pool's Social and external providers, then the app client's login pages |
| Issuer | Auto fill through issuer URL with https://oidc.triauth.org/<your domain>. If the path trips it, Manual input takes the four addresses /authorize, /token, /userinfo, and /jwks |
| Client authentication | Cognito keeps the client secret, so leave This app can't keep a secret unticked when you connect it on the bridge |
| Requirements | HTTPS on port 443, a key ID in the keys and tokens, responses under one megabyte, and a sign-in that finishes within five minutes. The bridge meets them |
| Identity Center | AWS IAM Identity Center connects identity providers over SAML only, so this page is about Cognito user pools |
Cognito's OIDC identity provider guide explains every field and the attribute mapping rules.
Next steps
- Read the OpenID Connect bridge page for what every connected app gets and what the bridge keeps private.
- Read Roll out to your team to give everyone in your organization an identifier at your domain.
- Read Groups to publish the groups that the pool maps to an attribute.
- Read Cognito's OIDC identity provider guide for every setting Cognito offers.
All logos and trademarks belong to their respective owners and do not imply affiliation or endorsement of the organization or product by triauth, nor vice versa. The content provided on this page may include information from third-party sources. We do not assume any responsibility for the completeness, correctness, or applicability of the information. You should independently verify any details before relying on them.