Disabling an account now takes effect
Disabling an account in the admin panel used to change only a flag: the account could still sign in and keep using the site. It now blocks sign-in and ends the account's sessions on this site.
Fixed
- A disabled account can no longer sign in by any method (password, code, Google, GitHub, Apple). Sign-in is answered with
403and"code": "account_disabled". Accounts with two-factor authentication are refused before the second step, and Google, GitHub and Apple sign-in returns to/auth/callback?error=account_disabled. - Disabling an account ends all of its sessions on every device at once, and a session of a disabled account stops working on its next request. Refreshing it is refused with
401(codes below). Enabling the account again lets it sign in again; the sessions that ended stay ended. - Ending the sessions is part of the disable itself. If it cannot be recorded, nothing changes and the admin panel reports an error, so re-enabling an account can never bring back its old sessions.
- Apps that use "sign in with this site" lose a disabled account at once: its tokens are revoked, and codes or tokens issued before the change are refused (
invalid_grant, or401from userinfo). A shared Riot account it held is taken back for a password change, as when an account is deleted. - A disabled account receives no more push notifications on any device.
- A disabled account's GitHub acceleration keys stop working once the accelerator next refreshes its key list. The keys themselves are not revoked: they work again if the account is re-enabled.
- Taking away an account's admin rights ends its sessions too, so the change applies immediately rather than when its access token expires. The admin edit response then includes
sessions_revoked. Admin rights are also checked against the account on every request, so they follow the change even without the sign-out.
Changed
- What you need to do (API clients): a session that a disable or a removal of admin rights ended is answered with
401,"code": "session_revoked"and"reason"set toaccount_disabledoradmin_rights_removed. That tells you why the session ended, not that the account is still disabled; only"code": "account_disabled"means that. Do not retry the refresh in either case, and branch oncodeandreason, not on theerrortext. - The
is_adminfield in access tokens now only reflects the moment the token was issued. - The admin edit response also includes
revoked_count(sessions ended) andrevocation_complete(whether every device has been told yet; the rest follow shortly, and those sessions are already unusable).
Added
- The sign-in, two-factor and third-party sign-in pages say when an account is disabled, and a browser signed out by a disable or a change of admin rights says why on the sign-in page.
- The admin panel's user editor explains what disabling and removing admin rights do, and reports how many sessions were ended.
What you need to do (administrators)
- Accounts that were marked disabled before this release were never actually blocked. Check the user list for accounts shown as disabled before upgrading: from this release on they cannot sign in.