How Long Connections Are Kept
Limit how long each person's own connection to an integration is kept, and when it is revoked
When a config asks each person to connect their own account (credential level User-level or User-level + shared fallback), Fruxon keeps what they connect until they disconnect it, by default. An admin can limit that per config: end each connection after a set time, end it with the conversation it was made in, and keep no refresh token.
The policy covers whatever a person connects under the config: an OAuth sign-in, or an API key, token or password they typed in. It never covers the config's shared, application-level credential.
Set it
On the config, under the credential level, set Keep each person's connection:
| Setting | What it does |
|---|---|
| Until they disconnect it | The default: no limit. |
| For a set time | The Period, from 5 minutes to 30 days. After it, the connection is deleted however much it was used, and the next time an agent needs the account, the person is asked to connect again. |
| End it when the conversation ends | A connection made during a conversation is deleted when that conversation closes: the agent closes it, the person goes quiet long enough for it to close, or the request it was opened for is resolved. Needs a period. |
| Don't keep a refresh token | For an OAuth sign-in only. The refresh token the service returns is thrown away before the connection is stored, so the connection lasts only as long as the service's sign-in does (often an hour), and then the person signs in again. Needs a period. |
Publish the config to make a change live.
The last two settings need a period because, without one, some connections would never end. A connection can be made outside a conversation, such as in a run from the API or a schedule, or in a conversation that never closes, like an email thread. And some services issue sign-ins that never expire.
From the CLI, fruxon integrations configs retention <integration> <config> shows the policy. To set it, add --max-age 8h, --end-with-conversation, --discard-refresh-token or --remove, then run fruxon integrations configs publish.
Changing the policy later
| Change | Connections already made |
|---|---|
| A shorter period | Ended on their next use once they're older than the new period. |
| A longer period, or no period | Keep the deadline they were given when they were made. |
| End it when the conversation ends or Don't keep a refresh token turned on | Unaffected. Applies to connections made after you publish. |
What people see
- Before they connect, the connect page tells the person how long the connection will be kept and whether it ends with the conversation.
- In My connections, each connection says when it ends.
- On the config's People tab and in the workspace's list of connected accounts, each person's connection shows when it ends.
What it does not do
- It doesn't tie a connection to one agent. Until a connection ends, any agent that uses the same config can use it on the person's behalf.
- It doesn't shorten the service's own token. An access token Fruxon has already used stays valid at the service until it expires there, unless it is revoked.
- It doesn't remove Fruxon from the person's account at the service. Deleting Fruxon's copy doesn't withdraw the consent the person gave. Fruxon may stay listed among their connected apps, and their next sign-in may skip the consent screen. People can remove it at the service themselves. My connections links to the place to do that where the service has one.
Revoking at your identity server
For a custom integration that signs people in through your own OAuth app, set Revocation URL on the method. Fruxon then revokes the person's token at your identity server (RFC 7009) whenever their connection ends. That happens when the period runs out, when the conversation ends, when the person disconnects it, and when an admin removes it. Fruxon revokes the refresh token when it has one, and otherwise the access token.
- The person's other connections: if the same person still has another connection on the integration, such as under another config, Fruxon deletes its own copy and does not revoke. At many identity servers, revoking one token ends the person's whole grant to the app, which would end that other connection too.
- When revoking fails: the connection stops working at once, as if it had ended, and Fruxon retries every few minutes. After 24 hours of failures it gives up, deletes the connection, and logs the failure.
- Built-in integrations (Gmail, Outlook, Slack and the rest) share one Fruxon app across workspaces and are not revoked this way. The connection is deleted from Fruxon only.
Revoking needs the client secret, so Fruxon sends it to the revocation URL as well as the token URL. Changing either address asks you for the secret again.