Skip to content
Advertisement

Tag: laravel-sanctum

laravel8 sanctum “Unauthenticated” when access any route under “auth:sanctum” middleware in server

I’m using sanctum for api, and all api run fine in localhost, but when run api in live server token doesn’t work, any route under “auth:sanctum” middleware redirect me to “Unauthenticated”, although i loged in, it loged in successfully and generate token, I passed “token” of the user in postman header, although it works fine in localhost, I tried alot

Token expiration doesn’t working – Sanctum, Laravel

What I did: I added token expiration to application that has login system, by changed null to 1 minute expiration in sanctum.php file: Problem: It doesn’t work, the app still accept authorized requests all the time. Nothing has changed. Code: Create token (login): Verify token: Delete token (log out): Answer You might need to clear your config cache. Try to

Advertisement