Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Basically.. this is the same issue in the d8 module
Comment | File | Size | Author |
---|---|---|---|
#2 | oauth2_server-token_length-2928943-1.patch | 710 bytes | Zekvyrin |
Comments
Comment #2
Zekvyrin CreditAttribution: Zekvyrin commentedAnd this how to solve it, based on the previous commit (D7).
Comment #3
Zekvyrin CreditAttribution: Zekvyrin commentedI have to say that I'm not 100% sure this is correct.. the token signature returned is Invalid :/
Comment #4
sanduhrsDid you manage to make this work?
Comment #6
sanduhrsComment #7
sanduhrsComment #9
sanduhrsThis needs a bit more thought.
Comment #10
terkaa CreditAttribution: terkaa commentedHi,
I get the same with Apache 2.4.53 when "JWT Access tokens" are enabled in server settings. Running Drupal 9.3.7 with Oauth2 Server 2.0.0-beta. Anything I could do to help resolving this issue?
Uncaught PHP Exception Drupal\\Core\\Entity\\EntityStorageException: "SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'token' at row 1: INSERT INTO "oauth2_server_token" ("client_id", "uid", "type", "token", "expires", "last_access") VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5); Array\n(\n [:db_insert_placeholder_0] => apache\n [:db_insert_placeholder_1] => 6\n [:db_insert_placeholder_2] => access\n [:db_insert_placeholder_3] => eyJ0eXAiOiJKV1QiLCJhbGciOiJ.....4OhYcg\n [:db_insert_placeholder_4] => 1647763676\n [:db_insert_placeholder_5] => \n)\n" at /var/www/html/drupal/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php line 811
Comment #11
Nate Covington CreditAttribution: Nate Covington as a volunteer and at Covington Creations, LLC commentedI was able to work around this error:
By modifying the oaht2_server_token table - change the "token" column to type=text
That'll allow for a longer token value and not throw the exception
However, I'm still getting this error after fixing it:
bad_signature
invalid_token
Any help would be appreciated
Comment #12
GaëlGThe change proposed in #2 still is in the Drupal 7 version of the module. I don't get why it shouldn't be in the D8+ one. The problem encountered in #3 may have another cause.