Insights / Technical notes

Aligning login expiry across services: session renewal and reauthentication

A generalized design for consistent login expiry across web services, separating explicit sign-in, server enforcement, cookies and identity-provider settings.

  • Authentication
  • Session
  • Web
Aligning login expiry across services: session renewal and reauthentication
Table of contents
  1. Compare the same request before and after expiry
  2. Identify each lifetime
  3. Separate explicit sign-in from ordinary access
  4. Enforce expiry on the server
  5. Separate configuration from behavior
  6. Verified case and remaining checks
  7. October 6, 2026 update: authentication continuation and application permissions

Sharing an account does not make every application session identical to the identity provider’s session. This internal case aligns expiry rules without publishing deployment targets or timeout values.

Compare the same request before and after expiry

Use a short lifetime in a test environment. Run explicit login, browsing, and background refresh separately and compare changes to server-held expiry. After expiry, try the same operation through the UI and API, checking reauthentication guidance and denial of data access. Record this separately from long-term production behavior.

OWASP:Session expiry design and testing

Identify each lifetime

Inventory the identity-provider session, application session and browser cookie separately. Absolute expiry, idle expiry and identifier rotation are different controls. Rotating an identifier need not extend the lifetime.

Separate explicit sign-in from ordinary access

The case renews the applicable period at successful explicit sign-in, not through browsing, background traffic, automatic token refresh or identifier rotation; those preserve the original deadline. A button click or callback arrival is not authentication success: validate the result. When fresh authentication is required, separately verify whether reusing the provider’s existing session meets that requirement.

Enforce expiry on the server

A longer-lived cookie does not define what the server accepts. Check server expiry, revocation, cookies and provider constraints together. Consistent rules do not imply a shared cookie or immediate logout from every service.

Validate the authority’s authentication time and expiry, and bound application lifetimes to them. The shared contract concerns session validation; business permissions remain with each application. A gateway with its own cookie is another expiry boundary to inventory and audit.

Keep authentication, sessions, and app permissions separate A shared expiry policy does not make these states one.
  1. Identity provider and callback Validate the authentication result and callback context/state. A sign-in alone grants no app permissions.
  2. App, cookie, and gateway Check expiry and revocation separately for the server-side app session, browser cookie, and gateway session.
  3. Per-service authorization Each app checks its own permissions. Ordinary traffic and background refresh do not extend expiry or imply global logout.

Separate configuration from behavior

Audit code and settings separately from sign-in, expiry boundaries, sign-in after expiry and logout tests. Check when existing sessions adopt the new policy and how both pages and APIs handle expiry. Record decisions and timestamps without session values or credentials.

Verified case and remaining checks

The history records policy changes, production rollout and tooling for configuration-difference audits. Real-user sign-in and waiting until actual expiry were not tested in these verification records. It does not establish elapsed-time testing on every user device or comprehensive proof of revocation and reauthentication safety. Choose durations and additional checks according to data and operation sensitivity.

Consult OWASP session management and authentication for general review. For another session layer, see Cloudflare session management. The recommendations above are not a claim that every check was completed in this case.

October 6, 2026 update: authentication continuation and application permissions

The anonymized changes separate arrival at an OIDC callback, token validation, continuation of the original authentication request, and application permissions. Missing continuation context is an explicit, safely recoverable error, not sign-in success. Validate return destinations; a shared account sign-in does not grant business permissions in every application.

Check the same contract for sign-in, registration, adding or removing providers, and recovery. Change and deployment records do not demonstrate real sign-in with every provider or every user, or complete testing that the last recovery method remains available.

Check additional authentication factors, identity-provider sign-in, the access gate, and protected application writes separately. A limited write canary does not replace all formal OIDC paths or rejection tests for suspended accounts. Registration, initial setup, change screens, and APIs share input rules; test rejection and acceptance at their boundaries. No particular character count is presented as a general standard.

Separate sign-in and registration screens and callback guidance. Display and health checks do not establish actual external account creation and consent acceptance. When retiring a provider, inventory buttons, callbacks, configuration, guidance, and tests together, and check for remaining paths.