You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The value stored there is the user identifier, which User::getIdentifier() and Admin::getIdentifier() return as identity. identity is VARCHAR(191). Any identity longer than 25 characters (for example an email address) cannot get an access token.
With strict SQL mode (the MariaDB/MySQL default) the insert fails:
An exception occurred while executing a query: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'user_id' at row 1
Without strict mode the value is truncated, so the token no longer matches its user.
How to reproduce
Create a user whose identity has more than 25 characters, for example johndoe@somerandomemail.com (27).
Request a token for that user (POST /security/generate-token with the password grant)
The request fails with the error above.
Expected behavior
The token is issued. oauth_access_tokens.user_id should be as long as identity (VARCHAR(191)),
Activity