laravel passport custom password column

前端 未结 2 1233
长发绾君心
长发绾君心 2021-01-13 11:53

How can I use Laravel\'s Passport package to authenticate a different password column.

If i want to authenticate from a different \'username\' column, it can be done

2条回答
  •  情深已故
    2021-01-13 12:23

    There's a method the Passport/Bridge asks for called validateForPassportPasswordGrant($password) that you can override in your user model, if you don't override this it will look for a password column in your user table. I'm not entirely sure why they haven't configured it to use Authenticatable method getAuthPassword...

提交回复
热议问题