PiR-P Hello, How are the passwords encoded? I would like to link my flarum database with an application and I wonder how can I check if the password entered in my application matches my flarum's account password. Cheers!
cristic In core/src/Core/User.php you have this : public function setPasswordAttribute($value) { $this->attributes['password'] = $value ? static::$hasher->make($value) : ''; } and static::$hasher->check($password, $this->password); so I think you can start from here ?
PiR-P Thanks! And where can I find this hasher? I just want to know the encoding process, not modifying it (unless it's easy to do it and won't create any conflicts with the rest of the scripts)
jordanjay29 PiR-P That's part of the Laravel API: https://laravel.com/api/5.2/Illuminate/Contracts/Hashing/Hasher.html
orpheus Where can you set the key lavarel uses for hashing the passwords? I have an other lavarel application and I would like the databases to sync, but therefor the passwords need to be the same ?
ganuonglachanh You don't need to find the hash key, you just use this function to verify the password is correct or not: $hash = password_hash($password, PASSWORD_BCRYPT); password_verify($password, $hash);