laravel / passport

Laravel Passport provides OAuth2 server support to Laravel.
https://laravel.com/docs/passport
MIT License
3.29k stars 780 forks source link

Passport returns SQL-query error message when requesting access token with client_id that contains non numeric characters #241

Closed noini closed 7 years ago

noini commented 7 years ago

Passport returns SQL-query error message when you request access token (aouth/token) with grant_type:password and use valid credentials (client_secret, username, password, scopes) with client_id that contains non numeric character (ie. 123A). Should be minor problem as you need to have all other credentials correct to reproduce the error.

Error message: SQLSTATE[01000]: Warning: 1265 Data truncated for column 'client_id' at row 1 (SQL: insert into 'oauth_access_tokens' ('id', 'user_id', 'client_id', 'scopes', 'revoked', 'created_at', 'updated_at', 'expires_at') values (57abbf96384a122df3f4a..., 1, 123A, [], 0, 2017-01-19 10:27:56, 2017-01-19 10:27:56, 2017-01-20 10:27:56))

frijj2k commented 7 years ago

Please see this thread: https://github.com/laravel/passport/issues/14

You need to use the numeric id for the client_id.

themsaid commented 7 years ago

Closing for lack of activity, hope you got the help you needed :)

baig772 commented 6 years ago

Any update on this? I am facing the same issue

kolozjnr commented 2 years ago

please any update this, i'm also having same issue in 2022