In core framework, getAuthIdentifier() is used to get user identifier for authentication.
However, in passport getKey() is used to get user identifier.
Below are the places where made us confused:
https://github.com/laravel/passport/blob/4e3390e67a5a74850698e1e991fd324b4dfa0ffa/src/Http/Controllers/AuthorizedAccessTokenController.php#L35-L42
https://github.com/laravel/passport/blob/55c1c546332db7bbbb95e0e4fd50ee8a690afc11/src/Http/Controllers/AuthorizationController.php#L107-L116
In our case, we used uuid as auth identifier but kept primary key as $primaryKey field for relationships.
Would you consider to change to use getAuthIdentifier() to be in sync with core framework design?
Hmm yes I believe so but we'd have to make the change on the next major release.
Most helpful comment
Hmm yes I believe so but we'd have to make the change on the next major release.