diff --git a/config/jwt.php b/config/jwt.php index 8b7843b6b..fda32689d 100644 --- a/config/jwt.php +++ b/config/jwt.php @@ -101,7 +101,7 @@ return [ | */ - 'ttl' => env('JWT_TTL', 60), + 'ttl' => env('JWT_TTL', null), /* |-------------------------------------------------------------------------- @@ -150,7 +150,6 @@ return [ 'required_claims' => [ 'iss', 'iat', - 'exp', 'nbf', 'sub', 'jti', diff --git a/packages/Sarga/API/Http/Controllers/Customers.php b/packages/Sarga/API/Http/Controllers/Customers.php index b21720651..795d6765b 100644 --- a/packages/Sarga/API/Http/Controllers/Customers.php +++ b/packages/Sarga/API/Http/Controllers/Customers.php @@ -13,19 +13,6 @@ use Webkul\Customer\Repositories\CustomerRepository; class Customers extends SessionController { - public function __construct(CustomerRepository $customerRepository) - { - $this->guard = request()->has('token') ? 'api' : 'customer'; - - auth()->setDefaultDriver($this->guard); - - $this->middleware('auth:' . $this->guard, ['only' => ['get', 'update', 'destroy']]); - - $this->_config = request('_config'); - - $this->customerRepository = $customerRepository; - } - /** * Method to store user's sign up form data to DB. * @@ -121,11 +108,11 @@ class Customers extends SessionController * * @return \Illuminate\Http\Response */ - public function update() + public function update(Request $request) { $customer = auth($this->guard)->user(); - $validation = Validator::make(request(), [ + $validation = Validator::make($request->all(), [ 'first_name' => 'required', 'last_name' => 'required', 'gender' => 'in:Male,Female',