Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Simple OAuth Refresh Token Buffer

25 sites Security covered Drupal 10–11
View on drupal.org

This module extends Simple OAuth to provide a configurable grace period for refresh token rotation. It prevents errors and improves user experience by allowing multiple simultaneous requests to refresh a token within a short timeframe to use the same refreshed token. This offers a balance between security and usability, similar to implementations in major authentication providers.

Extends the Simple OAuth module by implementing a configurable per-client grace period for the refresh token rotation.

What Problem Does This Solve?

The Simple OAuth module implements refresh token rotation by default. When multiple requests try to refresh tokens using the same refresh token, errors will be encountered due to the refresh token being rotated on the first request.

However in modern web applications there may be multiple independent requests trying to simultaneously refresh the expired token. Without a grace period, this leads to bad user experience and application errors.

Key Features

  • Configurable grace period (1-60 seconds) per OAuth2 client
  • Seamless integration with Simple OAuth module
  • Enterprise-grade solution similar to Auth0 and Okta implementations
  • Balanced approach to security and user experience

Example

A frontend application is configured to transparently refresh expired access tokens by using the refresh token grant.
A user comes back after some time and due to the nature of web applications, multiple requests are triggered simultaneously which leads to all of them trying to refresh the expired access token.
Normally, the first request would successfully get new tokens while the other ones would fail due to the refresh token being revoked.

With the enabled refresh token buffer, subsequent refresh attempts within the configured grace period will result in the same token from the first successful request.

This significantly improves the reliability and user experience of your Drupal-powered applications.

Security Note: While this module introduces a configurable grace period similar to major authentication providers like Auth0 and Okta, administrators should carefully consider their security requirements when setting the grace period length. The default value of 30 seconds provides a good balance between security and usability.

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
6
Tracked since
Jan 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 6
Maintenance
Dormant

Release Timeline

Releases

Version Type Core Release date
1.1.1 Stable 10–11 Jan 20, 2025
1.1.0 Stable 10–11 Jan 16, 2025
1.1.0-rc3 Pre-release 10–11 Jan 16, 2025
1.1.0-rc2 Pre-release 10–11 Jan 16, 2025
1.1.0-rc1 Pre-release 10–11 Jan 16, 2025
1.x-dev Dev 10–11 Jan 16, 2025