Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Simple OAuth Consumer Plugin

No security coverage Under active development

Define Simple OAuth consumers in code. Your site provides a known consumer in every environment, with no content entity to create or stage.

Features

Simple OAuth stores each consumer as a content entity. Content doesn't deploy with configuration, so each environment needs its own consumer: created by hand, by a script, or by a content migration. If the site depends on a known client ID, every environment has to get that consumer right.

This module defines the consumer in a YAML file in your codebase instead. The consumer deploys with the code, and it has the same client ID and settings in every environment. Add a MODULE.consumers.yml file to a custom module:

my_site.app:
  label: 'Site app'
  client_id: site_app
  redirect:
    - 'https://app.example.com/callback'

Only label and client_id are required. Every consumer plugin:

  • Is public. It has no secret and can't use the client credentials grant.
  • Requires PKCE by default.
  • Uses the authorization_code and refresh_token grants by default.
  • Never saves a consumer entity. Simple OAuth reads the consumer from the plugin, and tokens store its client ID.

You can also set description, grant_types, authorization_code_scopes, pkce, automatic_authorization, remember_approval, access_token_expiration, refresh_token_expiration, and third_party. They match the consumer fields of the same name.

Post-Installation

This module has no configuration page. Install it along with a module that provides a MODULE.consumers.yml file, and its consumers are ready to use. Rebuild caches after you edit a YAML file.

Consumer plugins don't appear on the Consumers list, because they're never saved.

If a saved consumer already uses the same client ID, the saved consumer wins. This holds even when it's disabled, so a plugin can't bring back a consumer that a site builder turned off.

Uninstalling the module that defines a consumer plugin deletes that consumer's tokens.

Additional Requirements

Similar projects

Simple OAuth's own consumer UI saves consumers as content on each site. Use it for consumers that differ between sites or environments, or that need a secret.

Drupal 11 · not 10

Ask your assistant about Simple OAuth Consumer Plugin

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Nov 2026
Latest release
41 minutes ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Releases

Version Type Core PHP Release date
1.0.0 Stable 11 Nov 25, 2026
1.0.x-dev Dev 11 Nov 25, 2026