Email attribute is missing in JSON web token

authentication

#1

Hi all,

we have used until now the version 2.5 of DF and in JSON Web token in the payload section the email attribute was submitted. Now we have a test server with version 2.7 installed and in JSON Web token the email attribute is no longer available.
Is this a new feature or why the email was removed from the payload section?

Thanks and best regards.
Uwe F.


#2

This is the reason:

JWTUtilities.php Line 34 has changed

V 2.5:
$payload = JWTFactory::sub($userId)->user_id($userId)->email($email)->forever($forever)->make();

V 2.7:
$payload = JWTFactory::sub(md5($email))->customClaims([‘user_id’ => $userId, ‘forever’ => $forever])->make();


#3

@Uwe_Friedrich please stay tuned in to our release notes, I believe the next release or release thereafter addresses this. You’ll be able to take any field in the user table (only) and place on the JWT, this will be configurable from the .env file.