Support the ongoing development of →
Last updated 2 years ago.

refresh token cannot be generated after original token expire. For security reasons, you must generate the new token before old one is expired. If you are using mobile app, then you can generate refresh token everytime user opens the app, and then after ever one hour. In that case, ttl for token expiry should be more than one hours.


you can use this middleware it return a new token in Header

namespace App\Http\Middleware;
use app\OpenTest\Functions;
use Closure;
class RefreshToken
     * Handle an incoming request.
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
    public function handle($request, Closure $next)
        $response = $next($request);
        return $response;
Last updated 7 years ago.

Sign in to participate in this thread!


Your banner here too?

yadhu680 yadhu680 Joined 22 Dec 2015


We'd like to thank these amazing companies for supporting us

Your logo here?

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 - All rights reserved.