[X] I have checked my logs and I'm sure is a bug in this package.
[X] I can reproduce this bug in isolation (vanilla Laravel install)
[X] I can suggest a workaround as a Pull Request
Expectation
I expect to be able to use uuids as the authenticable id
Description
My users table uses uuids ``
I've updated the 2fa migration to use $table->uuidMorphs('authenticatable', '2fa_auth_type_auth_id_index');
$twoFactorModel->authenticable throws an error because of the 'authenticatable_id' => 'int', attempting to cast the string uuid to a int.
Reproduction
// user migration
$table->uuid('userId')->primary()->unique();
// two-factor migration
$table->uuidMorphs('authenticatable', '2fa_auth_type_auth_id_index');
// attempt to retrive the user from the 2fa model - results in an error because uuid is cast to int e.g.
// "97d08fcf-6639-4e66-a301-d325e7f7435b" -> 97
$twoFactorModel->authenticable
// Error Message
// PDOException: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type uuid: "97"
PHP & Platform
8.2.9 - MacOSX
Database
PostgreSQL 15
Laravel version
10.21.0
Have you done this?
Expectation
I expect to be able to use uuids as the authenticable id
Description
My users table uses uuids ``
I've updated the 2fa migration to use
$table->uuidMorphs('authenticatable', '2fa_auth_type_auth_id_index');
$twoFactorModel->authenticable
throws an error because of the'authenticatable_id' => 'int',
attempting to cast the string uuid to a int.Reproduction
Stack trace & logs
No response