User session keeps expiring every few min


#1

Hi,
I refreshed user session but still after 2-30min it keeps expiring
and while api call I got this long error message what does this mean ?
I understand session is expired but before it used to give small message saying session expired
but that is this long message ?

{"_body":"{\"error\":{\"context\":null,\"message\":\"Token has expired: Session expired. Please refresh your token (if still within refresh window) or re-login.\",\"code\":401,\"trace\":[\"0 [internal function]: DreamFactory\\\\Http\\\\Middleware\\\\AccessCheck->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\",\"1 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\bootstrap\\\\cache\\\\compiled.php(9666): call_user_func_array(Array, Array)\",\"2 [internal function]: Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\",\"3 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\vendor\\\\laravel\\\\framework\\\\src\\\\Illuminate\\\\Routing\\\\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\\\Http\\\\Request))\",\"4 [internal function]: Illuminate\\\\Routing\\\\Pipeline->Illuminate\\\\Routing\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\",\"5 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\bootstrap\\\\cache\\\\compiled.php(9651): call_user_func(Object(Closure), Object(Illuminate\\\\Http\\\\Request))\",\"6 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\bootstrap\\\\cache\\\\compiled.php(9175): Illuminate\\\\Pipeline\\\\Pipeline->then(Object(Closure))\",\"7 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\bootstrap\\\\cache\\\\compiled.php(9162): Illuminate\\\\Routing\\\\ControllerDispatcher->callWithinStack(Object(DreamFactory\\\\Http\\\\Controllers\\\\RestController), Object(Illuminate\\\\Routing\\\\Route), Object(Illuminate\\\\Http\\\\Request), 'handlePOST')\",\"8 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\bootstrap\\\\cache\\\\compiled.php(8230): Illuminate\\\\Routing\\\\ControllerDispatcher->dispatch(Object(Illuminate\\\\Routing\\\\Route), Object(Illuminate\\\\Http\\\\Request), 'DreamFactory\\\\\\\\Ht...', 'handlePOST')\",\"9 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\bootstrap\\\\cache\\\\compiled.php(8217): Illuminate\\\\Routing\\\\Route->runController(Object(Illuminate\\\\Http\\\\Request))\",\"10 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\bootstrap\\\\cache\\\\compiled.php(7931): Illuminate\\\\Routing\\\\Route->run(Object(Illuminate\\\\Http\\\\Request))\",\"11 [internal function]: Illuminate\\\\Routing\\\\Router->Illuminate\\\\Routing\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\",\"12 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\vendor\\\\laravel\\\\framework\\\\src\\\\Illuminate\\\\Routing\\\\Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\\\\Http\\\\Request))\",\"13 [internal function]: Illuminate\\\\Routing\\\\Pipeline->Illuminate\\\\Routing\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\",\"14 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\bootstrap\\\\cache\\\\compiled.php(9651): call_user_func(Object(Closure), Object(Illuminate\\\\Http\\\\Request))\",\"15 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\bootstrap\\\\cache\\\\compiled.php(7932): Illuminate\\\\Pipeline\\\\Pipeline->then(Object(Closure))\",\"16 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\bootstrap\\\\cache\\\\compiled.php(7923): Illuminate\\\\Routing\\\\Router->runRouteWithinStack(Object(Illuminate\\\\Routing\\\\Route), Object(Illuminate\\\\Http\\\\Request))\",\"17 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\bootstrap\\\\cache\\\\compiled.php(7913): Illuminate\\\\Routing\\\\Router->dispatchToRoute(Object(Illuminate\\\\Http\\\\Request))\",\"18 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\bootstrap\\\\cache\\\\compiled.php(2419): Illuminate\\\\Routing\\\\Router->dispatch(Object(Illuminate\\\\Http\\\\Request))\",\"19 [internal function]: Illuminate\\\\Foundation\\\\Http\\\\Kernel->Illuminate\\\\Foundation\\\\Http\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\",\"20 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\vendor\\\\laravel\\\\framework\\\\src\\\\Illuminate\\\\Routing\\\\Pipeline.php(52): call_user_func(Object(Closure), Object(Illuminate\\\\Http\\\\Request))\",\"21 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\app\\\\Http\\\\Middleware\\\\AuthCheck.php(183): Illuminate\\\\Routing\\\\Pipeline->Illuminate\\\\Routing\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\",\"22 [internal function]: DreamFactory\\\\Http\\\\Middleware\\\\AuthCheck->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\",\"23 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\bootstrap\\\\cache\\\\compiled.php(9666): call_user_func_array(Array, Array)\",\"24 [internal function]: Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\",\"25 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\vendor\\\\laravel\\\\framework\\\\src\\\\Illuminate\\\\Routing\\\\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\\\Http\\\\Request))\",\"26 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\vendor\\\\barryvdh\\\\laravel-cors\\\\src\\\\HandleCors.php(42): Illuminate\\\\Routing\\\\Pipeline->Illuminate\\\\Routing\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\",\"27 [internal function]: Barryvdh\\\\Cors\\\\HandleCors->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\",\"28 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\bootstrap\\\\cache\\\\compiled.php(9666): call_user_func_array(Array, Array)\",\"29 [internal function]: Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\",\"30 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\vendor\\\\laravel\\\\framework\\\\src\\\\Illuminate\\\\Routing\\\\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\\\Http\\\\Request))\",\"31 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\bootstrap\\\\cache\\\\compiled.php(17368): Illuminate\\\\Routing\\\\Pipeline->Illuminate\\\\Routing\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\",\"32 [internal function]: DreamFactory\\\\Http\\\\Middleware\\\\FirstUserCheck->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\",\"33 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\bootstrap\\\\cache\\\\compiled.php(9666): call_user_func_array(Array, Array)\",\"34 [internal function]: Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\",\"35 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\vendor\\\\laravel\\\\framework\\\\src\\\\Illuminate\\\\Routing\\\\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\\\Http\\\\Request))\",\"36 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\bootstrap\\\\cache\\\\compiled.php(13113): Illuminate\\\\Routing\\\\Pipeline->Illuminate\\\\Routing\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\",\"37 [internal function]: Illuminate\\\\View\\\\Middleware\\\\ShareErrorsFromSession->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\",\"38 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\bootstrap\\\\cache\\\\compiled.php(9666): call_user_func_array(Array, Array)\",\"39 [internal function]: Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\",\"40 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\vendor\\\\laravel\\\\framework\\\\src\\\\Illuminate\\\\Routing\\\\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\\\Http\\\\Request))\",\"41 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\bootstrap\\\\cache\\\\compiled.php(11656): Illuminate\\\\Routing\\\\Pipeline->Illuminate\\\\Routing\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\",\"42 [internal function]: Illuminate\\\\Session\\\\Middleware\\\\StartSession->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\",\"43 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\bootstrap\\\\cache\\\\compiled.php(9666): call_user_func_array(Array, Array)\",\"44 [internal function]: Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\",\"45 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\vendor\\\\laravel\\\\framework\\\\src\\\\Illuminate\\\\Routing\\\\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\\\Http\\\\Request))\",\"46 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\bootstrap\\\\cache\\\\compiled.php(12852): Illuminate\\\\Routing\\\\Pipeline->Illuminate\\\\Routing\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\",\"47 [internal function]: Illuminate\\\\Cookie\\\\Middleware\\\\AddQueuedCookiesToResponse->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\",\"48 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\bootstrap\\\\cache\\\\compiled.php(9666): call_user_func_array(Array, Array)\",\"49 [internal function]: Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\",\"50 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\vendor\\\\laravel\\\\framework\\\\src\\\\Illuminate\\\\Routing\\\\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\\\Http\\\\Request))\",\"51 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\bootstrap\\\\cache\\\\compiled.php(12789): Illuminate\\\\Routing\\\\Pipeline->Illuminate\\\\Routing\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\",\"52 [internal function]: Illuminate\\\\Cookie\\\\Middleware\\\\EncryptCookies->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\",\"53 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\bootstrap\\\\cache\\\\compiled.php(9666): call_user_func_array(Array, Array)\",\"54 [internal function]: Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\",\"55 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\vendor\\\\laravel\\\\framework\\\\src\\\\Illuminate\\\\Routing\\\\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\\\Http\\\\Request))\",\"56 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\bootstrap\\\\cache\\\\compiled.php(3286): Illuminate\\\\Routing\\\\Pipeline->Illuminate\\\\Routing\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\",\"57 [internal function]: Illuminate\\\\Foundation\\\\Http\\\\Middleware\\\\CheckForMaintenanceMode->handle(Object(Illuminate\\\\Http\\\\Request), Object(Closure))\",\"58 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\bootstrap\\\\cache\\\\compiled.php(9666): call_user_func_array(Array, Array)\",\"59 [internal function]: Illuminate\\\\Pipeline\\\\Pipeline->Illuminate\\\\Pipeline\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\",\"60 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\vendor\\\\laravel\\\\framework\\\\src\\\\Illuminate\\\\Routing\\\\Pipeline.php(32): call_user_func(Object(Closure), Object(Illuminate\\\\Http\\\\Request))\",\"61 [internal function]: Illuminate\\\\Routing\\\\Pipeline->Illuminate\\\\Routing\\\\{closure}(Object(Illuminate\\\\Http\\\\Request))\",\"62 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\bootstrap\\\\cache\\\\compiled.php(9651): call_user_func(Object(Closure), Object(Illuminate\\\\Http\\\\Request))\",\"63 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\bootstrap\\\\cache\\\\compiled.php(2366): Illuminate\\\\Pipeline\\\\Pipeline->then(Object(Closure))\",\"64 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\bootstrap\\\\cache\\\\compiled.php(2350): Illuminate\\\\Foundation\\\\Http\\\\Kernel->sendRequestThroughRouter(Object(Illuminate\\\\Http\\\\Request))\",\"65 C:\\\\Bitnami\\\\dreamfactory-2.2.1-2\\\\apps\\\\dreamfactory\\\\htdocs\\\\public\\\\index.php(53): Illuminate\\\\Foundation\\\\Http\\\\Kernel->handle(Object(Illuminate\\\\Http\\\\Request))\",\"66 {main}\"]}}","status":401,"ok":false,"statusText":"Ok","headers":{"Content-Type":["application/json"],"Cache-Control":["no-cache"]},"type":2,"url":"http://127.0.0.1:8080/api/v2/system/user"}


#2

is there an api to check token status like if its valid or expired ?


#3

Hey @Vinod_Hum,

Have you checked out this thread?

Thanks,
@AlexBowen