{"action":"created","issue":{"url":"https://api.github.com/repos/bshaffer/oauth2-server-php-docs/issues/110","repository_url":"https://api.github.com/repos/bshaffer/oauth2-server-php-docs","labels_url":"https://api.github.com/repos/bshaffer/oauth2-server-php-docs/issues/110/labels{/name}","comments_url":"https://api.github.com/repos/bshaffer/oauth2-server-php-docs/issues/110/comments","events_url":"https://api.github.com/repos/bshaffer/oauth2-server-php-docs/issues/110/events","html_url":"https://github.com/bshaffer/oauth2-server-php-docs/issues/110","id":299402636,"number":110,"title":"Use use_jwt_access_tokens with Pdo storage","user":{"login":"SventB","id":2690489,"avatar_url":"https://avatars1.githubusercontent.com/u/2690489?v=4","gravatar_id":"","url":"https://api.github.com/users/SventB","html_url":"https://github.com/SventB","followers_url":"https://api.github.com/users/SventB/followers","following_url":"https://api.github.com/users/SventB/following{/other_user}","gists_url":"https://api.github.com/users/SventB/gists{/gist_id}","starred_url":"https://api.github.com/users/SventB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SventB/subscriptions","organizations_url":"https://api.github.com/users/SventB/orgs","repos_url":"https://api.github.com/users/SventB/repos","events_url":"https://api.github.com/users/SventB/events{/privacy}","received_events_url":"https://api.github.com/users/SventB/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-22T15:44:27Z","updated_at":"2018-03-23T15:30:08Z","closed_at":null,"author_association":"NONE","body":"When I use Pdo Storage together with option \"use_jwt_access_tokens\", the generated access tokens are very long but the database field \"access_token\" in table \"oauth_access_tokens\" can handle just 40 characters (see https://bshaffer.github.io/oauth2-server-php-docs/cookbook/).\r\n\r\n```\r\n$storage = new OAuth2\\Storage\\Pdo($pdo);\r\n$server = new \\OAuth2\\Server($storage, [\r\n  'use_jwt_access_tokens' => true,\r\n]);\r\n```\r\n\r\nDid I configure something wrong?\r\nOr do I have to change field \"access_tokens\" to type \"text\" and remove the primary key?"},"comment":{"url":"https://api.github.com/repos/bshaffer/oauth2-server-php-docs/issues/comments/375703607","html_url":"https://github.com/bshaffer/oauth2-server-php-docs/issues/110#issuecomment-375703607","issue_url":"https://api.github.com/repos/bshaffer/oauth2-server-php-docs/issues/110","id":375703607,"user":{"login":"iqbalfn","id":5726035,"avatar_url":"https://avatars3.githubusercontent.com/u/5726035?v=4","gravatar_id":"","url":"https://api.github.com/users/iqbalfn","html_url":"https://github.com/iqbalfn","followers_url":"https://api.github.com/users/iqbalfn/followers","following_url":"https://api.github.com/users/iqbalfn/following{/other_user}","gists_url":"https://api.github.com/users/iqbalfn/gists{/gist_id}","starred_url":"https://api.github.com/users/iqbalfn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iqbalfn/subscriptions","organizations_url":"https://api.github.com/users/iqbalfn/orgs","repos_url":"https://api.github.com/users/iqbalfn/repos","events_url":"https://api.github.com/users/iqbalfn/events{/privacy}","received_events_url":"https://api.github.com/users/iqbalfn/received_events","type":"User","site_admin":false},"created_at":"2018-03-23T15:30:08Z","updated_at":"2018-03-23T15:30:08Z","author_association":"NONE","body":"That's actually normal, the `access_token` is now provided as JWT. You could change the table column type to `text` ( but primary key maybe a problem under MySQL, or no? ), or set `store_encrypted_token_string` option to `false` to save only un-encrypted `access_token`."}}
{"actor":{"display_login":"iqbalfn"}}