drupal-simple-oauth

Implement OAuth2 token management and role-based scope filtering in Drupal.

1|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/mgifford/drupal-core --skill drupal-simple-oauth
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: drupal-simple-oauth
Source: https://github.com/mgifford/drupal-core/tree/main/.agents/skills/drupal-simple-oauth
Command: npx skills add https://github.com/mgifford/drupal-core --skill drupal-simple-oauth

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and assets (resource) components.

What problem does it solve?

This Skill provides comprehensive patterns for implementing OAuth2 authentication in Drupal, simplifying secure API access management.

Core Features & Use Cases

  • Token Handling: Manages OAuth tokens including creation, validation, and permission checks.
  • Role & Scope Matching: Enforces role-based access control aligned with OAuth scopes, supporting dynamic scope provider setups.
  • Use Case: Securely authenticates mobile app API requests using OAuth tokens with precise role and permission filtering.

Quick Start

Use the drupal-simple-oauth skill to set up OAuth token-based authentication workflows for your Drupal site.

Frequently Asked Questions about drupal-simple-oauth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up OAuth2 token authentication for a Drupal API?

To set up OAuth2 token authentication for a Drupal API, you implement OAuth2 token management and configure scope entities to match Drupal's role and permission system for secure access.

How does role-based scope filtering work with Drupal OAuth tokens?

Role-based scope filtering for Drupal OAuth tokens works by enforcing that OAuth scopes correspond accurately to user roles and permissions, dynamically filtering access control for API requests.

Can I use OAuth2 to securely authenticate mobile app API requests in Drupal?

Yes, you can securely authenticate mobile app API requests in Drupal using OAuth2 tokens, applying precise role and permission filtering to manage access based on configured scopes.

What is the best way to manage OAuth2 permissions and scopes in Drupal?

The best way to manage OAuth2 permissions in Drupal is by integrating with the role and permission system and configuring scope entities, ensuring OAuth scopes align with user roles for consistent security.

Why are my Drupal API OAuth token permissions not matching user roles correctly?

Drupal API OAuth token permissions may not match user roles if scope entities are not configured accurately to correspond with the user role and permission system, leading to inconsistent security enforcement.