-
Notifications
You must be signed in to change notification settings - Fork 950
Description
I encountered a problem with SQL SERVER
when inserting the access token and refresh token into oauth_access_tokens and oauth_refresh_tokens in src\OAuth2\Storage\Pdo.php
line 409 for setRefreshToken
line 206 for setAccessToken
returns this error
SQLSTATE[22007]: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]The conversion of an nvarchar data type to datetime generated a value outside the allowed range
the field causing the error is the datetime --> expires
To resolve this issue at this time,
can I set the changes to VARCHAR and not DATETIME
or do I need to modify the line
$expires = date('Y-m-d H:i:s', $expires);
in
$expires = date('Y-d-m H:i:s', $expires);
To ensure correct insertion, you could consider passing the function with {ts 'YYYY-MM-DD HH:MM:SS'}
do you have a better solution to propose?