Closed EvodiaAut closed 8 months ago
Hi there,
Thanks for reporting but it looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repo you can try one of the following channels:
However, this issue will not be locked and everyone is still free to discuss solutions to your problem!
Thanks.
Sanctum Version
3.3.3
Laravel Version
10.44
PHP Version
8.1
Database Driver & Version
No response
Description
Hi,
default the token look like
1|f4SwPYmyi0NPGkJn...
<INT>|<STRING>
With
Sanctum::usePersonalAccessTokenModel()
i overwrite the functionfindToken()
and change the$id
from<INT>
to a HashId<STRING>
, now my token looks like4EBNRJ9D|f4SwPYmyi0NPGkJn...
<STRING>|<STRING>
Now I can't pass the function isValidBearerToken() (new i version 3.x). The function
ctype_digit()
return false with the value4EBNRJ9D|f4SwPYmyi0NPGkJn...
And get a HTTP Status 401 - "Unauthenticated"Is it no longer possible to output the ID in the format if i want? Or how can I rewrite this function?
thx.
Steps To Reproduce
Change the token from
1|f4SwPYmyi0NPGkJn...
to4EBNRJ9D|f4SwPYmyi0NPGkJn...
Change the format<INT>|<STRING>
to<STRING>|<STRING>