F
Filamentβ€’8mo ago
Eren

These credentials do not match our records.I dont know whats happening.

I added 2 different users to check. Both of them not working. Can not login panel. It doesnt match records. How ? how it is possible πŸ™‚ Its on production.
Solution:
if anyone got any problems like that you can disable hasVerified part and you can login. Its really odd. ```public function canAccessPanel(Panel $panel): bool { return str_ends_with($this->email, '@domain.com');...
Jump to solution
14 Replies
Dennis Koch
Dennis Kochβ€’8mo ago
Where is the user data coming from? Especially the passwords?
Srccode
Srccodeβ€’8mo ago
Hey! By any chance you are hashing the password in your user model or any other place before saving? I discovered that when we are creating the user, filament hashes the password and i was hashing the password in the user model and it ended up becoming double hashed and was causing me the same issue.
Eren
ErenOPβ€’8mo ago
I didnt touch anything in User Model. I just move to production. After that password or email doesnt work. Its working on local machine. Nope.
Dennis Koch
Dennis Kochβ€’8mo ago
And you moved the database, too?
Eren
ErenOPβ€’8mo ago
I did php artisan migrate but without any data. thats why i create new user. I created 2 users but couldn't login.
Dennis Koch
Dennis Kochβ€’8mo ago
Oh, so you created both users on production after migrating?
Eren
ErenOPβ€’8mo ago
yes
Dennis Koch
Dennis Kochβ€’8mo ago
That's weird. Did you create them via make:filament-user? Or via Registration form?
Eren
ErenOPβ€’8mo ago
via make:filament-user btw i logged in probably now. I cleaned some cache etc. but now i got 403 page.
Dennis Koch
Dennis Kochβ€’8mo ago
You implemented canAccessPanel on your user model?
Eren
ErenOPβ€’8mo ago
oh my bad. after deploy few things. User modal changed again. I fixed it but still i got credentials error. Can not login.
Dennis Koch
Dennis Kochβ€’8mo ago
I thought that was just fixed? Are you wiping the DB during deployment?!
Eren
ErenOPβ€’8mo ago
Nope. It didn't fix. I dont do any db things during deployment. I have one seeder for my language seeder. because it will be multi language and dynamic routes. but its just few column for language. I dont think its a problem for User column. Not working at all. I tried everyting
if (Hash::check('ererer123', $user->password)) {
. echo "Password correct.\n"; . } else { . echo "Password wrong.\n"; . } Password correct. > I tried to check password from db with tinker. Password is correct but still can not login. Probably this make me crazy for a while πŸ™‚ if you have an idea. Please let me know. thank you
Solution
Eren
Erenβ€’8mo ago
if anyone got any problems like that you can disable hasVerified part and you can login. Its really odd.
public function canAccessPanel(Panel $panel): bool
{
return str_ends_with($this->email, '@domain.com');
}
public function canAccessPanel(Panel $panel): bool
{
return str_ends_with($this->email, '@domain.com');
}
Want results from more Discord servers?
Add your server