Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: Drupal 11.4.6 Update released for Drupal core (11.4.6)! Release: Drupal 10.6.16 Update released for Drupal core (10.6.16)! Release: PhotoSwipe - Responsive JavaScript Modal Image Gallery 5.0.10 Minor update available for module photoswipe (5.0.10). Release: Twig Tweak 4.0.0-alpha5 New alpha version released for module twig_tweak (4.0.0-alpha5). Release: Media PDF Thumbnail 6.1.10 Minor update available for module media_pdf_thumbnail (6.1.10). Release: UI Patterns (SDC in Drupal UI) 2.0.21 Minor update available for module ui_patterns (2.0.21). Release: MTCaptcha 11.1.0 Minor update available for module mtcaptcha (11.1.0). Release: Drupal LMS 1.2.2 Minor update available for module lms (1.2.2). Module Revived: Media PDF Thumbnail 7.0.1 Module media_pdf_thumbnail updated after 15 months of inactivity (7.0.1). Usage Milestone: Menu Condition Module menu_condition crossed 1,000 active installs.

JWT / Simple_Oauth Fallback

No security coverage Drupal 10–11 PHP >=8.1
View on drupal.org

Features

The JWT and Simple OAuth modules both authenticate a request by reading a
bearer token from the Authorization header, and each registers a
global authentication provider that claims any request
carrying one:

Provider ID Module Priority Global jwt_auth jwt 200 yes oauth2 simple_oauth 35 yes

Drupal's AuthenticationManager invokes only the single
highest-priority provider whose applies() returns
TRUE — there is no fallback to the next one. Because
jwt_auth outranks oauth2 and claims every bearer
request, a valid Simple OAuth access token is handed to the JWT provider,
which cannot decode it and returns NULL. The request then
continues as anonymous, so the API responds 403 instead of
401 and the token appears to be silently ignored.

This module makes JWT and OAuth2 bearer tokens work on the same endpoints. It:

  • Registers a single replacement provider that, on a bearer request, tries
    the JWT provider and then the Simple OAuth provider in turn and returns the
    first account either one produces;
  • Removes the authentication_provider tag from the original
    jwt_auth and oauth2 services so they no longer
    compete, while leaving both service objects registered and unchanged for
    every other consumer (token issuing, signing and validation are untouched);
  • Still enforces each route's _auth allowlist against the
    mechanism that actually authenticated the request, so a token is never
    accepted on a route that excludes its own mechanism;

Use it when a single Drupal site exposes APIs that must
accept both token types on shared routes — for example a decoupled front end
that authenticates end users with JWT while server-to-server integrations use
Simple OAuth client-credentials tokens, or a site migrating from one module
to the other that needs both honoured during the transition. If you only ever
issue one kind of bearer token, you do not need this module.

Post-Installation

There is no configuration UI, no config page, no new content type or
permission. Enabling the module is sufficient; uninstalling it fully restores
Drupal's default behaviour.

Additional Requirements

Beyond Drupal core, this module requires two contributed modules:

No external PHP libraries, services or APIs are needed on top of what those
two modules already require. Supports Drupal 10 and 11.

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
Sep 2026
Latest release
2 hours ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Releases

Version Type Core Release date
1.0.0 Stable 10–11 Sep 4, 2026
1.0.x-dev Dev 10–11 Sep 4, 2026