# delete_expired_auth_descriptors · FT4 Rell API · Chromia Docs (concept)

> function delete_ expired_ auth_ descriptors(account: account , keep_auth_desc: account_ auth_ descriptor ?): set<immutable_ mirror_ struct< account_ auth_ 

Source: https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/delete_expired_auth_descriptors/

FUNCTION

# delete\_expired\_auth\_descriptors

```signature
function delete_expired_auth_descriptors(account: account, keep_auth_desc: account_auth_descriptor?): set<immutable_mirror_struct<account_auth_descriptor>>
```

[Source](https://gitlab.com/chromaway/ft4-lib/-/blob/development/rell/src/lib/ft4/core/accounts/auth_descriptor_rule_validation.rell#lines-452)

Deletes all expired auth descriptors associated with an account, except `keep_auth_desc` if
not null.

Can only be called from an operation.

Throws if the rules to any of the auth descriptors associated with the account have invalid
rules.

Throws if the main auth descriptor for the account has expired. This should never happen,
as main auth descriptors with rules cannot be added via FT4.

**Parameters**

* **account** — the account to clean up
* **keep\_auth\_desc** — the account\_auth\_descriptor used in the current operation. It should not be deleted even if expired

**Returns**

set<struct<account\_auth\_descriptor>> deleted\_descriptors

**See Also**

* [account\_auth\_descriptor.rules](https://docs.chromia.com/pages/ft4-rell/-f-t4-library/lib.ft4.core.accounts/account_auth_descriptor/) — for the list of valid GTV representations of rules.

[View this page on docs.chromia.com](https://docs.chromia.com/pages/ft4-rell/-f-t4%20-library/lib.ft4.core.accounts/delete_expired_auth_descriptors.html)Generated API reference, mirrored from the live docs
