Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

delete token for current user request laravel

//Using Laravel - Sanctum version 8, 9

// Revoke all tokens...
$user->tokens()->delete();

// Revoke the token that was used to authenticate the current request...
$request->user()->currentAccessToken()->delete();

// Revoke a specific token...
$user->tokens()->where('id', $tokenId)->delete();
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #delete #token #current #user #request #laravel
ADD COMMENT
Topic
Name
8+6 =