OAuth2 error in Mezzio

hi everyone,
i’m using mezzio for api and chose OAuth2 for authentication
when send user info to TokenEndpointHandler for request token,
( grant_type = password)

reterun this error:

“error”: “access_token_duplicate”,
“error_description”: “Could not create unique access token identifier”,
“message”: “Could not create unique access token identifier”

what’s mean???

i found this error:

Method persistNewAccessToken() sets values to table oauth_access_tokens, fields user_id and client_id set values as strings, but columns type is integer

did i do something wrong??

Please check the following issue report and add your comments:

1 Like

I think it might also be the same as my problem (SQL errors with OAuth authentication with laminas-authentication-oauth).

I will try to investigate this next week. The information in the issue seems quite sparse to me. Any ideas where to start? Seems like a very basic problem that has been around for some time.

So here is what i think: it is just wrong column types in the sql-scripts. It should be a string and it works when you use other column types.

To be clear:

So i would argue, that the provided SQL scripts are wrong.

1 Like

Anybody help me out basic oauth2 example code for authentication. Entity and repository i have but struggle to implement and do the authentication.
using doctrine ORM