Accounts and permissions
Help people access their account, control permissions and leave safely.
Sign in and return
After sign-in, return people to the item or task they were trying to open. Keep sensitive details out of the return address.
Implementation guide for sign in and return
When to use it
Require identity to protect a task or record, not as a default barrier to reading or trying a public tool. Choose a maintained identity integration with a recovery path appropriate to the audience. Passkeys, federated identity or password-based options are product decisions; do not promise that every device supports one method or force a new identity provider without need.
States and recovery
Signed out → entering credentials/using provider → working → authenticated and returned to the intended permitted task. Include cancellation, wrong credentials, rate limit, unavailable provider, MFA/verification required and inaccessible authenticator. Distinguish service failure from invalid details without revealing account membership. Preserve nonsensitive task context, not passwords in URLs or storage.
Keyboard and screen readers
Use visible labels and appropriate autocomplete tokens (username, current-password, new-password or one-time-code). Allow password managers and paste throughout the process. A show-password button keeps focus and exposes its purpose/state; never disguise a credential field as a custom canvas. Avoid memory puzzles and transcription-only recovery. Provide an accessible alternative when a chosen method cannot be used. All authentication steps need consideration, including recovery. W3C accessible-authentication guidance.
Layout and preferences
Test password-manager overlays, third-party screens and mobile keyboards in both themes. Do not split codes into separate auto-advancing fields unless their accessible editing/paste behaviour is proven; a single labelled field is usually simpler. No fixed-height card may hide errors or recovery links.
Implementation
Existing labels, .ex-input, action/status styles and form submission lifecycle provide presentation. An inert field excerpt is:
<label class="ex-label" for="sign-in-name">Email address</label>
<input class="ex-input" id="sign-in-name" name="username"
type="email" autocomplete="username" spellcheck="false">
<label class="ex-label" for="sign-in-password">Password</label>
<input class="ex-input" id="sign-in-password" name="password"
type="password" autocomplete="current-password">This fragment submits nothing. The adopter supplies the protected form/API, provider lifecycle, safe redirect, session creation, throttling and error mapping. Never place credentials in a GET form.
Data and permissions
Use TLS and maintained credential/session handling. Generic failure responses must be consistent enough to avoid revealing account existence. Select reauthentication and privileged MFA requirements for actual risk; avoid inventing password algorithms or logging credentials. OWASP authentication guidance.
Checks to run
- Complete every supported method and fallback with keyboard, password manager/paste and assistive technology.
- Provider cancellation/failure and malformed return URL recover safely.
- Real endpoint tests cover invalid credentials, enumeration behaviour, throttling and direct private access.
- A completed sign-in returns only to an authorised internal task. Not verified; edition 0.2.0-rc.2.
Recover an account
Give people a clear next step when a sign-in method fails or a recovery link expires.
Implementation guide for recover an account
When to use it
Provide recovery for the chosen identity model. For federated accounts, explain which provider owns recovery; do not imply a local password reset exists. Offer a clear help route when an authenticator is lost, without an ad hoc support bypass of identity checks.
States and recovery
Request → neutral acknowledgement → delivered link/code → verification → new credential → confirmed result → ordinary sign-in. Include mail delay, resend limits, expired/used/invalid token, changed address and suspected compromise. A recovery request does not prove delivery. Resend explains whether older links still work. Preserve useful context while clearing sensitive values at the appropriate lifecycle boundary.
Keyboard and screen readers
Keep acknowledgement on screen and in one polite status if focus stays on the form. Expired links need a heading, short explanation and “Request a new link”. Allow code paste and new-password autocomplete; associated hints state requirements before submission. Do not auto-advance or impose an unexplained short countdown. Recovery language must identify the next action without telling a stranger whether an address is registered.
Layout and preferences
Support moving between mail and browser, opening a link in another tab/device and enlarged text. Long addresses and errors wrap. The flow remains understandable without relying on colour, a delivered-email animation or automatic app switching.
Implementation
Reuse field/error summary/form status patterns; use a full page for a recovery link that must work independently. Example copy: “If an account matches that address, we’ll send recovery instructions.” This is specimen copy, not an email service. The integration owns token lifecycle, delivery, verified account binding and session handling.
Data and permissions
Recovery tokens require unpredictable generation, protected storage, bounded lifetime and single use; rate-limit requests and avoid membership leaks. Never change the account merely because recovery was requested. After suspected compromise, address existing sessions and changed recovery methods, not only the password. Avoid tokens in analytics/referrers and remove them from the visible URL once safely exchanged. OWASP recovery guidance.
Checks to run
- Exercise expired, reused and wrong-account tokens with real service denial.
- Delayed delivery/resend and inaccessible authenticator provide a usable next step.
- Existing versus nonexistent accounts do not reveal membership through response content/status/timing.
- Compromised-account recovery invalidates the sessions/tokens required by the chosen policy. Not verified; edition 0.2.0-rc.2.
Session expiry and sign-out
If a session expires while someone is editing, explain how to sign in again and which work they can recover.
Implementation guide for session expiry and sign-out
When to use it
Explain why a person must sign in again. Choose a risk-appropriate session lifetime, not repeated interruptions for their own sake. When a time limit affects completing a task, provide the applicable adjustment/extension mechanism or document a real exception; “security” alone is not a blanket exemption. W3C timing guidance.
States and recovery
Active → warning/extension where applicable → expired → reauthenticate → return. Sign-out has pending, confirmed and uncertain/failed states. A server response may arrive after expiry; do not display private data or overwrite newer work from that response. For unsaved work, use the product's approved retention policy rather than silently writing sensitive drafts to the device. Reauthentication must not automatically repeat an unresolved consequential action.
Keyboard and screen readers
Announce a meaningful impending timeout once and provide a reachable extension action; avoid a live second-by-second timer. A necessary modal uses the native dialog contract and does not unexpectedly discard work on Escape. After sign-out, focus the public page heading; after reauthentication, return to the appropriate surviving task. An expired session is not a field-validation error.
Layout and preferences
Keep warnings and actions reachable above the mobile keyboard and at high zoom. If the user switches tabs or suspends a phone, calculate from the actual session state instead of relying on a smoothly running client timer. Reduced motion does not disable warnings; visual effects are optional.
Implementation
Use status, buttons and optionally openDialog; a product service owns current session truth and the continuation route. Example: Common preserves an allowed in-memory title after expiry, requests sign-in, then asks the user to submit again after verifying the saved state. It does not claim a draft survived a reload.
Data and permissions
Expiry and logout must be enforced server-side; clearing a client flag is insufficient. Use appropriate secure cookie/session settings and rotate/invalidate sessions at relevant identity transitions. Clear per-user client caches and guard Back/another-tab private content according to the product policy. OWASP session guidance.
Checks to run
- Expire during editing and during a write, then recover without losing allowed work or duplicating the effect.
- Sign out, use Back and another tab, then directly request private content using the old session.
- Interrupt logout and show honest uncertainty rather than unconditional “Signed out”.
- Test warning/extension with a slow assistive-technology task. Not verified; edition 0.2.0-rc.2.
Ask for permission
Ask when a person tries the feature that needs permission. Explain what they can still do if they decline.
Implementation guide for ask for permission
When to use it
Ask for a capability when it enables a clear task. Browser permission, application role and resource access are different decisions. Offer a manual alternative where reasonable: a location field can replace geolocation; a file picker can replace camera access. Administration is a separately protected capability, not merely a different navigation colour.
States and recovery
Not requested, explaining purpose, native permission prompt, granted, denied, revoked, unsupported, role changed and request pending. Do not repeatedly prompt after denial; give a useful fallback and instructions only for the actual browser. Distinguish “request access” from granting it. Role changes and invitations need explicit scope, expiry and revocation behaviour.
Keyboard and screen readers
A native button initiates the request; its label names the capability. Return from a browser prompt to a logical control and announce the outcome once when appropriate. Permission explanations are visible text, not hover help. Group administrative actions with clear scope and name the affected person/resource. Use ordinary links for admin destinations; disabled actions need a reason.
Layout and preferences
Do not imitate the OS permission sheet. Confirm the underlying task remains operable after the sheet closes, with keyboard, touch and enlargement. Long role names and scoped permissions wrap. Preserve readable scope during narrow-screen confirmation.
Implementation
Use fields/selects for roles, createMenu for a short action list and native dialog for consequential changes. Example: “Invite Morgan as a viewer of Travel” identifies role and collection before a request is sent. This guide sends no invitation and defines no role engine. Product code supplies capability detection, role matrix, grant/revoke endpoints and audit records.
Data and permissions
Deny by default and recheck every protected request, including object ownership, downloads, exports and role updates. A client-selected role must never grant itself authority. Validate invitation target/scope, prevent privilege escalation and test revoked access against cached/direct routes. See OWASP authorization guidance.
Checks to run
- Deny/revoke a browser capability and complete its documented fallback.
- Actual API requests cover signed-out, wrong user/tenant, viewer attempting write, revoked member and nonadmin attempting promotion.
- Pending access request is never presented as a grant.
- Admin confirmation still names exact scope with long values at 320px. Not verified; edition 0.2.0-rc.2.
Close an account
Show what will be deleted, what can be exported first and when closure takes effect.
Implementation guide for close an account
When to use it
Offer account closure where accounts exist. Separate sign-out, subscription cancellation, deactivation and deletion; name what each action does. An optional export may help, but must not become a needless barrier. Explain effects on shared records and what can or cannot be restored.
States and recovery
Review scope → appropriate identity verification → confirmed request → processing → completed, failed or partly retained under an explained policy. A cooling-off/cancel window exists only if implemented. Do not call a queued deletion complete, or imply billing has stopped unless the payment integration confirms it. Cross-reference P05.3 for data handling.
Keyboard and screen readers
Use a specific destructive label and a readable review of consequences. Keep Cancel available until commitment; avoid preselected destructive confirmation. Do not require inaccessible memory tests or arbitrary exact typing as the only safeguard. On completion, move to a public confirmation heading. Failure retains a clear help/retry path without exposing internal errors.
Layout and preferences
The full consequence summary and controls remain readable on narrow/short screens; long organisation names must not hide the account being closed. The native dialog contract applies if the review is genuinely short; choose a full page for substantial policy and dependencies.
Implementation
Use .ex-button--danger, a review page or openDialog and status. The product owns reauthentication, jobs, retention, shared ownership, sessions, provider/billing integration and idempotency. No deletion service is supplied here.
Data and permissions
Verify current authority server-side before accepting a request; reauthentication should match the risk. Revoke relevant sessions and tokens, handle external processors and explain retained records accurately. Ensure another user's data is not removed because a shared item appears in the account view. Follow the selected identity provider's current deletion contract.
Checks to run
- Cancel before commitment leaves data intact.
- Repeat/timeout request resolves to one deletion job and an accurate status.
- Wrong-user/delegated-role requests fail; shared resources follow the declared policy.
- Completion, billing state and retained-data wording match actual service evidence. Not verified; edition 0.2.0-rc.2.
