DocID®DocID® Documentation
Back to DocID®
  • Overview

    • DocID® Documentation
  • Introduction

    • Introduction
    • How DocID® works
    • Core concepts
  • Getting Started

    • Getting Started
    • Drupal module
    • WordPress plugin
    • Custom website
    • Go-live checklist
  • Features

    • Features
    • Standard Login
    • Access and personalization
    • Analytics
    • Campaigns
  • Licenses

    • Licenses
  • OAuth 2.0

    • OAuth 2.0
    • Configure a client
    • Authorization code flow
    • Scopes and UserInfo
    • Security and environments
  • API

    • API
  • Help

    • Troubleshooting

OAuth 2.0

Security and environments

Protect credentials, tokens, sessions, and environment boundaries.

Separate environments

Development, staging, and production use distinct clients and redirect registrations. Treat every environment as a separate security boundary.

  • Never use production secrets in local development.
  • Never accept a callback issued for another environment.
  • Keep issuer, client ID, secret, and redirects in one typed environment configuration.
  • Fail startup when required OAuth configuration is missing.

Protect credentials and tokens

  • Perform code exchange, refresh, introspection, revocation, and UserInfo calls on the server.
  • Encrypt secrets and refresh tokens at rest.
  • Redact authorization codes, tokens, secrets, cookies, and personal claims from logs.
  • Do not place tokens in URLs.
  • Rotate a secret immediately if it may have been exposed.

Protect the browser session

  • Generate new state, nonce, and PKCE values for each attempt.
  • Make OAuth transactions short-lived and single-use.
  • Regenerate the local session identifier after authentication.
  • Use secure, HTTP-only cookies and protect state-changing requests against CSRF.
  • Authorize protected resources on every server request, not only in the interface.

Limit data

Request and retain only the data required for the website's documented purpose. Define retention, deletion, access, and incident processes with your privacy and security owners.

PreviousScopes and UserInfoNextAPI

On this page

  1. Separate environments
  2. Protect credentials and tokens
  3. Protect the browser session
  4. Limit data