|
@@ -64,9 +64,7 @@ class AuthController extends Controller {
|
|
|
return $this->jsonError('登陆失败');
|
|
|
}else{
|
|
|
$shopAccount = Auth::user();
|
|
|
-// $shopAccount->token = $token;
|
|
|
-// $shopAccount->token_ttl = config('jwt.ttl');
|
|
|
- $factory = JWTFactory::customClaims(['shop'=>['shop_id'=>$shopAccount->id,'sign'=>md5($shopAccount->id)]]);
|
|
|
+ $factory = JWTFactory::customClaims(['shop'=>['uid'=>$shopAccount->id,'shop_id'=>$shopAccount->shop_id,'sign'=>md5($shopAccount->id).env('JWT_SECRET')]]);
|
|
|
$payload = $factory->make();
|
|
|
|
|
|
$token = JWTAuth::encode($payload);
|