hyperf-http-auth
hyperf-http-auth copied to clipboard
how can we should store password?
hello , with which method does this lib check the password?
i tried using password_hash() but it throws username or password is invalid?
here what i trying
/**
* @PostMapping(path="/signup")
* @param SignUp $request
* @param User $user
* @return Model
*/
public function SignUp(SignUp $request, User $user): Model
{
return $user->query()->create([
'username' => $request->input('username'),
'email' => $request->input('email'),
'password' => password_hash($request->input('password'), PASSWORD_BCRYPT)
]);
}
https://github.com/laravel/framework/blob/8.x/src/Illuminate/Hashing/BcryptHasher.php#L45