OAuth2 Authorization code was already redeemed

Created on 7 October 2020, about 5 years ago
Updated 27 August 2025, about 1 month ago

I've enabled the module via composer, activated the module and added permissions. I've registered an app in Azure AD, but when I try to login via SSO, I get the following error (after many redirects).

Error description: AADSTS54005: OAuth2 Authorization code was already redeemed, please retry with a new valid code or use an existing refresh token. Trace ID: d51bf4ca-d50c-4e1e-86a9-1d23d51b4200 Correlation ID: 777f86e5-052e-4bb4-a6c3-8420395fad05 Timestamp: 2020-10-07 18:15:03Z

In the Drupal log, I see another error as well:

RuntimeException: Failed to start the session because headers have already been sent by "/code/vendor/symfony/http-foundation/Response.php" at line 377. in Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage->start() (line 150 of /code/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php)

If I try to login again using SSO, I get this error in the log as well:
Something went wrong: No access token has been provided.

I've attached a screenshot of my app settings.

πŸ’¬ Support request
Status

Closed: outdated

Version

3.0

Component

Miscellaneous

Created by

πŸ‡ΊπŸ‡ΈUnited States benmmc

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡³πŸ‡±Netherlands fabianderijk Alphen aan den Rijn

    I haven't seen this problem come up since a long time, also there has not been any comments on this issue since 2 years. I will close this.

Production build 0.71.5 2024