tymondesigns / jwt-auth

🔐 JSON Web Token Authentication for Laravel & Lumen
https://jwt-auth.com
MIT License
11.29k stars 1.54k forks source link

JWTAuth::parseToken()->authenticate() error when id contains character #931

Open mhafizhasan opened 7 years ago

mhafizhasan commented 7 years ago

Hi there, I have a user table where id is varchar. I've manage to generate a token based on user object using JWTAuth::fromUser($user);. However, when i tried to authenticate generated user token using JWTAuth::parseToken()->authenticate() it throws user_not_found error. This only happens if my user id contains character (ie: abc123) rather than just integer (123) which is working fine.

Is this a bug or am I missing something?

shalomabitan commented 7 years ago

Can it be that you set the identifier to the id field of your database and that field is an int so it clashed. make sure your identifier is set correctly

stale[bot] commented 3 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.