Support the ongoing development of Laravel.io →
Authentication Sanctum API

Hello everyone, i have question laravel sanctum, i'm creating authentication for spa & mobile app, let's say the front end is react.js, my boss wants the auth token valid for 15 minutes. After that it goes invalid and the message "unauthenticated", and the front end user has to login again to regain new token. I need advices for front end developer on how to obtain/refresh token without having to log in again? Thanks

Last updated by @baimtheelite 3 years ago.
0

There is a package that adds a refresh token functionality for Sanctum. Can't remember the name, but you can find it with a simple google.

0

Sign in to participate in this thread!

PHPverse

Your banner here too?

Moderators

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

Your logo here?

Laravel.io

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

© 2025 Laravel.io - All rights reserved.