You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to use Laravel Passport's php artisan passport:install or php artisan passport:client command to create a personal access client, a datatype mismatch error image
occurs during the insertion of data into the oauth_clients table. This issue prevents the successful creation of personal access clients. It's a fresh project, not an existing application with all dependencies including composer and linux environment( not sure if thats part of the problem anyway though)
Also, the Question marks for the user_id and providers section got me a little worried so i double checked the migration file. looks good as it accepts nullable value
Original Migration file:
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('oauth_clients', function (Blueprint $table) {
$table->bigIncrements('id');
$table->unsignedBigInteger('user_id')->nullable()->index();
$table->string('name');
$table->string('secret', 100)->nullable();
$table->string('provider')->nullable();
$table->text('redirect');
$table->boolean('personal_access_client');
$table->boolean('password_client');
$table->boolean('revoked');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('oauth_clients');
}
};
ive tried inspecting the package itself, still am. so i think i'd just drop this here so anyone who might have come across it can get updates.
Steps To Reproduce
Run the passport:install command on a fresh install of a laravel project using an sqlite (3.45.3) database.
I chose yes for the below
Would you like to create the "personal access" and "password grant" clients? (yes/no) [yes]:
Observe the error message indicating a datatype mismatch during the insertion of data into the oauth_clients table. im not sure if thats the only one but its the first that pops up.
The text was updated successfully, but these errors were encountered:
After a series of re-installs and investigations, I have identified the root cause of the issue. The error occurs prominently when attempting to use UUIDs for clients in Laravel Passport. This issue may stem from the table schema itself.
I found that avoiding UUIDs completely resolves the problem. By keeping the
'client_uuids' => false
in the configuration option, in the config/passport.php file. the datatype mismatch error no longer occurs. I'll try tweaking some more parts...let's see what pops up
Heya. Going to close this one now since there's only been one report and there's a workaround. Should you have any other findings, feel free to post them.
Passport Version
12.2.0
Laravel Version
11.7.0
PHP Version
8.2.14
Database Driver & Version
Sqlite
Description
When attempting to use Laravel Passport's
php artisan passport:install
orphp artisan passport:client
command to create a personal access client, a datatype mismatch errorimage
occurs during the insertion of data into the
oauth_clients
table. This issue prevents the successful creation of personal access clients. It's a fresh project, not an existing application with all dependencies including composer and linux environment( not sure if thats part of the problem anyway though)Also, the Question marks for the user_id and providers section got me a little worried so i double checked the migration file. looks good as it accepts nullable value
Original Migration file:
ive tried inspecting the package itself, still am. so i think i'd just drop this here so anyone who might have come across it can get updates.
Steps To Reproduce
passport:install
command on a fresh install of a laravel project using an sqlite (3.45.3) database.oauth_clients
table. im not sure if thats the only one but its the first that pops up.The text was updated successfully, but these errors were encountered: