2

I'm using dingo-api with tymondesigns/jwt-auth for JWT auth provider. I generate tokens with custom claims for user details. However, on token refresh, the new token resets the claims. I've resorted to doing:

# Refresh and set token
$this->auth->setToken($this->auth->parseToken()->refresh());
# Get user from token
$token = $this->auth->fromUser($this->auth->toUser());

Even though it works, I don't think I should be hitting the DB again.

Murwa
  • 2,238
  • 1
  • 20
  • 21

0 Answers0