# beike-auth **Repository Path**: huasell/beike-auth ## Basic Information - **Project Name**: beike-auth - **Description**: 修改laravel的auth包 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-03-14 - **Last Updated**: 2023-03-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # beike-auth #### 介绍 把里面验证password字段,跳过,使用自己命令的一个标记极端phone_code来表示,这个是一个通过sms验证了的用户名,可以直接返回true。 vendor/laravel/framework/src/Illuminate/Auth/EloquentUserProvider.php #### 原来的代码 ``` public function validateCredentials(UserContract $user, array $credentials) { $plain = $credentials['password']; return $this->hasher->check($plain, $user->getAuthPassword()); } ``` #### 现在的代码 ``` public function validateCredentials(UserContract $user, array $credentials) { if ( array_key_exists('phone_number', $credentials)){ return true; } $plain = $credentials['password']; return $this->hasher->check($plain, $user->getAuthPassword()); } ```