# Remember what users allowed

> Ask a user once per app, not at every sign-in, see what the realm remembers, or turn remembering off so every sign-in asks.

A user who allowed an app isn't asked again each time they sign in to it. The realm keeps one record per user and
app, listing everything they allowed, and widens it when the app asks for more. Remembering is on by default; this
guide is for the realm administrator who wants to see those records, or to ask every time instead.

**Before you start:** you hold `RealmOwner` in the realm (`RealmViewer` is enough to read the records), with your session in `$CVYUH_SESSION` (see
[Call the API](../../../develop/api/)).

## When a user is asked again

| The app asks for… | Asked? |
|---|---|
| the same as before, or less | No |
| a scope they haven't allowed | Yes, and the record widens |
| `offline_access` | Always |
| anything, with `prompt=consent` | Always |
| `authorization_details` | Always: only scopes are remembered |
| anything, from a public app at a loopback or custom-scheme address | Always |

## Ask every time instead

<Steps>

1. Read the records the realm keeps now, so you know what will stop being remembered:

   ```sh
   curl https://foobar.cvyuh.com/api/v0/am/objects/v1/oauth2Consent \
     -H "Cookie: x-cvyuh-token=$CVYUH_SESSION"
   ```

2. Stop remembering consent in the realm:

   ```sh
   curl -X PATCH https://foobar.cvyuh.com/api/v0/am/objects/v1/oauth2Settings/oauth2Settings \
     -H "Cookie: x-cvyuh-token=$CVYUH_SESSION" \
     -H "Content-Type: application/json" \
     -d '{ "rememberConsent": false }'
   ```

   From the next sign-in, every app asks every user.

</Steps>

## Check it worked

List the realm's consent records again, on `/objects/v1/oauth2Consent`. Each is an `oauth2Consent` object naming the
user, the app and the scopes allowed, with when they were first and last given. With remembering on, a user's sign-in
to an app they allowed before shows no consent page; with it off, every sign-in does.

## Undo it

Send `{ "rememberConsent": true }` to remember again.

## Related

- [The consent page](../../consent/consent-page/): when the realm asks, and every setting.
- [Let users remove apps they allowed](../people-remove-apps/): users see and remove what they allowed.
- [Show or skip the consent page](../consent-screen/): let your own apps skip the page.
