twimco.Let’s talk ↗︎
Menu
Field notes / Product & engineering

Amazon Cognito now lists every device a user is signed in on. Build the "sign out everywhere" support keeps promising

Someone calls to say their phone was stolen and asks you to log them out of your app. Until this week, many teams on Amazon Cognito had to improvise that answer. Cognito can now show and end a user's sessions device by device, which means the screen people expect can finally be built properly.

Editorial engraving of a bright support floor where an agent on a headset singles out one row on his screen as his team lead leans in and nods.

Since November 11, 2026, Amazon Cognito user pools on the Essentials or Plus plans can track sessions: list a user's active sign-ins by device and app, end one or all of them, cap how many a user may hold and set how long single sign-on is reused. It's off by default. Turn it on, build a 'where you're signed in' screen and an admin sign-out for support, and make sure your own servers stop trusting revoked tokens.

The call your support team dreads

A customer calls. Their phone was stolen on the train, your app was signed in on it, and they want it logged out now. They also mention an old tablet they gave to a relative.

On many apps built on Amazon Cognito, the honest answer used to be "change your password and we'll do what we can." Support could sign the user out everywhere, which also signed them out of the laptop they were calling from, but nobody could see which devices were signed in or end just one.

On November 11, AWS added session management to Cognito user pools. It's the missing piece for that call.

It's also the piece customers have come to expect. Banking apps, email providers and streaming services have shown people a list of their signed-in devices for years. When your app doesn't, the request goes to support instead, and support improvises. This note is about closing that gap without creating new problems on the way.

Sequence of work

A lost phone, with session tracking on

  1. Call comes in

    The customer says their phone was stolen an hour ago.

  2. Verify

    Support confirms identity the way it always does, outside the app.

  3. Find the device

    The admin view lists sessions by device type, app, last activity and rough location.

  4. End it

    Support revokes that session, or every session, without touching the account password.

  5. Confirm

    The app on the stolen phone is refused at its next request to your API.

Illustrative support flow for an app on Amazon Cognito; not AWS guidance.

What AWS added

With session tracking on, Cognito keeps a server-side record of each session a user starts. There are two kinds. A single sign-on (SSO) session is created when someone signs in through Cognito's managed login and lets them reach other app clients without signing in again. A token session is created when they sign in to an app client and receive tokens.

For each session you get the session type, the app client, the device type, the last activity time and location, and the first sign-in time. AWS's guide says the location is derived from the IP address, so treat it as approximate.

You can then:

  • List a user's active SSO and token sessions across devices and apps.
  • Revoke one session, optionally with the sessions linked to it, or use global sign-out to end everything for that user.
  • Cap how many token sessions a user may hold. The default is 20 and the maximum is 100. When a user hits the cap and signs in again, the sign-in works and Cognito ends the least recently used session. SSO sessions are fixed at 10 per user.
  • Tune how long each app client reuses an SSO session before asking the user to sign in again, instead of the old fixed hour.

Users can list and end their own sessions; administrators have separate operations authorized with AWS credentials. That split maps neatly onto a settings screen for customers and an admin tool for support.

Revoking a session in Cognito is only half the job if your own API never asks.

The catches to know first

It's off by default. You opt in per user pool, and the pool must be on the Essentials or Plus feature plan. If you're on the Lite plan, this starts with a pricing conversation.

Revoked doesn't mean rejected everywhere. Cognito's token revocation guide is blunt: revoked tokens "will still be valid if they are verified using any JWT library that verifies the signature and expiration." If your API checks tokens locally, which is common because it's fast, a stolen phone with a revoked token keeps working until the access token expires. Revoking a session in Cognito is only half the job if your own API never asks. Shorten access-token lifetimes, check the new session id against Cognito for sensitive actions, or both.

A custom sid claim switches it off. With tracking on, Cognito adds a sid claim to ID and access tokens. If a pre token generation trigger already adds its own sid, Cognito leaves it alone and session tracking quietly doesn't operate for that pool. Check your triggers.

Machine tokens aren't tracked. Client-credentials tokens used between services don't count as sessions.

Multi-Region pools are eventually consistent. Near-simultaneous sign-ins in different Regions can briefly push a user over the cap; Cognito tidies up at the next sign-in or refresh.

Decision guide

Before and after session tracking

ConsiderationWithout session trackingWith session tracking on
Where am I signed in?No server-side list to showList of sessions with device, app and last activity
Sign out one deviceRevoke a refresh token you may not be able to findRevoke that session by its id
Sign out everywhereGlobal sign-out of tokensGlobal sign-out also ends tracked sessions
Too many devicesNo built-in capCap per user; oldest unused session is ended
Single sign-on reuseFixed one hourSet per app client
Decision framework based on the Cognito Developer Guide read November 12, 2026; check your own app's token handling.

What to build

Three small things cover most of the value.

A "where you're signed in" screen in account settings: one row per session with device type, app, last active and an approximate place, and a button to sign out each one. Show the current device clearly so people don't sign themselves out by accident. Keep the wording plain; "iPhone app, last active 2 hours ago, near Boston" is enough.

An admin sign-out for support, behind your internal tools, with the same list and a reason field. Log who ended which session and why. The next time someone calls about a stolen phone, support verifies them the usual way and ends that one device in a minute.

A sensible cap. For a consumer app, 20 active sessions per person is generous; for a staff app on shared devices, you may want fewer. Decide on purpose, because the cap ends the oldest unused session without asking.

Send an email when a new device signs in, too, with a link straight to that screen. It's the cheapest early warning you can give a customer whose password has leaked.

Then test the unhappy path: revoke a session and confirm the app on that device is actually refused by your API, not just by Cognito. If you've had trouble with sign-in flows before, our notes on the session that expired and took the form and deep links that land on login cover the other end of the same problem.

Who should do this now

If your app handles money, health, children's data or anything people would be upset to see on a stolen phone, this is worth scheduling soon. The same goes for staff apps on shared tablets, where "who's signed in on the warehouse iPad" is a daily question.

If your app is low-risk and nobody has ever asked, it can wait for the next planned release. Just don't wait for the first call. When it comes, the person on the phone is worried, and "we can't see that" is the worst thing to hear from a company holding their account. Even a basic version, an admin list and a single sign-out button, changes that conversation.

Where we help

Most of the work here sits in your app and API rather than in Cognito: token checks, the account screen, the support tool and the tests. If you'd like help adding session controls to an existing app, that's part of our mobile application work. Talk to us.

Related work: Sutton|Place

twimco.

We build alongside the people doing the work.
Bring us the problem you’re thinking about.

Related work

Sutton Place ↗︎