Drupal Simple Oauth
Explains OAuth2 authentication in Drupal with the simple_oauth module - TokenAuthUser AND-permission logic, scope/role intersection, OAuth2 scope entities and the dynamic scope provider, mobile app password-grant token requests, field_permissions and JSON:API field access under a token, Bearer-token CSRF 403s, consumer TTLs, and debugging token permission denials. Use when an OAuth/Bearer token is denied a permission the user has, configuring consumers, clients or scopes, requesting tokens from a mobile or decoupled app, or getting 403s on JSON:API requests made with a Bearer token.
Install
npx skills add grasmash/drupal-claude-skills --skill drupal-simple-oauthgit clone --depth 1 https://github.com/grasmash/drupal-claude-skills.git /tmp/drupal-claude-skills
mkdir -p ~/.claude/skills
cp -r /tmp/drupal-claude-skills/skills/drupal-simple-oauth ~/.claude/skills/drupal-simple-oauthPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Drupal Simple OAuth Patterns
Comprehensive patterns for working with the simple_oauth module for OAuth2 authentication in Drupal. Use when working with API authentication, mobile app tokens, or OAuth2 implementation.
## Version Information
- Verified against simple_oauth 6.1.1 (consumers 8.x-1.24); line numbers below refer to that release
- Scope provider: dynamic (role-based granularity)
- Current Drupal: 10.x/11.x compatible
## Critical OAuth Token Concepts
### TokenAuthUser: The Core Authentication Wrapper
When a request is authenticated with an OAuth token, Drupal wraps the user in a `TokenAuthUser` decorator that enforces BOTH token AND user permissions.
**Location:** `<webroot>/modules/contrib/simple_oauth/src/Authentication/TokenAuthUser.php` (`<webroot>` is `web/` or `docroot/` depending on the project)
#### Permission Check Logic (Line 95)
```php
public function hasPermission($permission) {
// User #1 has all permissions.
if ((int) $this->id() === 1) {
return TRUE;
}
return $this->token->hasPermission($permission) && $this->subject->hasPermission($permission);
}
```
**Critical Rule:** BOTH the token AND the user must have the permission (AND condition).
#### Role Intersection Logic (Line 107)Details
- Skill name
drupal-simple-oauth- Repository
- grasmash/drupal-claude-skills
- Path
skills/drupal-simple-oauth/SKILL.md- License
- MIT
- Repo updated
- 1 October 2026
FAQ
What does the Drupal Simple Oauth skill do?
Explains OAuth2 authentication in Drupal with the simple_oauth module - TokenAuthUser AND-permission logic, scope/role intersection, OAuth2 scope entities and the dynamic scope provider, mobile app password-grant token requests, field_permissions and JSON:API field access under a token, Bearer-token CSRF 403s, consumer TTLs, and debugging token permission denials. Use when an OAuth/Bearer token is denied a permission the user has, configuring consumers, clients or scopes, requesting tokens from a mobile or decoupled app, or getting 403s on JSON:API requests made with a Bearer token.
How do I install the Drupal Simple Oauth skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add grasmash/drupal-claude-skills --skill drupal-simple-oauth. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Drupal Simple Oauth popular?
It lives in grasmash/drupal-claude-skills, which has 84 GitHub stars and 5 forks.
Related skills
Acquia Source
84grasmash/drupal-claude-skills
Connect to an Acquia Source ("Source powered by Drupal CMS") site — its JSON:API and MCP endpoints, OAuth2 auth, the @drupal-canvas CLI, and the Canvas Page API deploy workflow. Use when wiring an AI agent or app to a Source CMS site, building/uploading Drupal Canvas Code Components, deploying landing pages via the Page API, or registering the Source MCP server with Claude Code/Cursor.
Canvas Contribution
84grasmash/drupal-claude-skills
Workflow for contributing features and fixes to the Drupal Canvas module on drupal.org while consuming it from a separate project: the two-repository setup, Canvas UI development, issue forks, merge requests, and composer patches. Use when developing a Canvas feature or bug fix intended for upstream, or when moving a local Canvas change onto a drupal.org issue. Extends drupal-contrib-mgmt with Canvas-specific details.
Claude Code MCP Setup
84grasmash/drupal-claude-skills
Add and configure MCP (Model Context Protocol) servers in Claude Code. Use when adding new MCP servers, configuring remote MCP, setting up OAuth MCP servers, troubleshooting MCP connections, or running /mcp diagnostics. Covers stdio, HTTP, and SSE transport types.
Drupal Views Patterns
84grasmash/drupal-claude-skills
Working with Drupal Views — both the build/optimize mechanics (cache plugins, exposed filters, pager, relationships, row plugins, REST/data_export displays, render caching, query cost) AND the decision of whether to use a View at all vs. a custom controller/query/JSON:API. Load when creating ANY listing/feed/table/grid/leaderboard/block-of-rows or REST/JSON listing endpoint; when a View is slow or loads full entities it does not render; when adding/editing exposed filters, sorts, pagers, relationships, or a view's cache settings; or when deciding "View vs custom vs JSON:API" for a new query su
Drupal Search API
84grasmash/drupal-claude-skills
Search API configuration, boosting strategies, and processor patterns for Drupal. Covers index field types, custom boost processors, number-field and engagement-metric boosting, Solr field-type drift on config export, and reindexing workflows. Use when configuring or debugging a Search API index, tuning relevance or result ranking, writing a custom search processor, or when search results are missing, stale, or ordered unexpectedly.
Insforge CLI
47InsForge/insforge-skills
Use this skill whenever someone needs a backend, or a task touches InsForge backend or cloud infrastructure through the InsForge CLI: projects, SQL, migrations, RLS policies, functions, storage, backups, deployments, compute, secrets, config, schedules, logs, diagnostics, advisor scans and suppressions, import/export, AI/OpenRouter setup and usage overview, Stripe/Razorpay payments, Apify web scraping / data sources, PostHog product analytics, backend branches, organization membership (invite, leave, delete), agent memory (remember/recall project facts and decisions), reporting InsForge-side b
Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.