Two things for access that is meant to end.
Account expiry
Set a date and time on any account. An hourly job acts when it passes — disabling by default, or deleting with content reassignment if you choose that instead.
Disable is the one to reach for. It is reversible and it costs you a database row.
This is the answer to the contractor account nobody closes. The decision gets made on the day access is granted, when the end date is known and everybody is paying attention, rather than eleven months later when nobody is.
Almost every dormant administrator found in an audit is an account that was never given an end date.
Temporary access links
A passwordless sign-in URL with:
- A scoped role, usually lower than the account it belongs to
- An expiry
- A maximum number of uses
- One-click revocation
For giving a developer, a support engineer or an agency access without creating a permanent account, without sharing a password, and without a follow-up task to remember.
Compare it with the shared password it replaces: a link has an owner, an expiry, a use count, and every use is logged with an address and a time. A shared password has none of those, and it outlives the engagement.
It is also *easier* than creating an account, which is what makes it actually get used.
Every use is logged
Each use writes an event with the IP address, user agent and time. So *who used the support link, and when* has an answer, and a link being used from somewhere unexpected is visible rather than invisible.
A temporary access link is a bearer credential. Anybody holding the URL can use it, up to its limits — a forwarded email is a granted login. Keep the expiry short and the use count low, and revoke it when the work is finished rather than letting it lapse.
Revoking
One click. Revocation ends any session the link created as well as preventing further use — otherwise it would only stop the next person, not the one already in.