filament icon indicating copy to clipboard operation
filament copied to clipboard

Requires Remember Me checked to log in successfully

Open gioVerdiansyah opened this issue 1 year ago • 1 comments

Package

filament/filament

Package Version

3.2

Laravel Version

11.30.0

Livewire Version

No response

PHP Version

8.2.21

Problem description

I found a bug in Filament on Laravel 11 where, when my users table uses UUIDs for the id column and I have the HasUuids trait in my model, I am unable to log in to the panel without checking "Remember Me." However, if I check "Remember Me," the login works fine. When I use a non-UUID id in the users table, I can log in normally.

Why could this bug be happening

Expected behavior

Login normally.

Steps to reproduce

  1. install laravel 11
  2. install filament
  3. change id to uuid in table
  4. try to login

Reproduction repository (issue will be closed if this is not valid)

https://github.com/gioVerdiansyah/greenperpus

Relevant log output

No response

gioVerdiansyah avatar Nov 05 '24 09:11 gioVerdiansyah

Make sure to alter $table->foreignId('user_id')->nullable()->index(); to $table->foreignUuid('user_id')->nullable()->index(); in default migration for session table (that is, if you're using database as the session driver.

SETIexplorer avatar Dec 19 '24 12:12 SETIexplorer

Thanks @SETIexplorer!

danharrin avatar Jun 22 '25 15:06 danharrin