Recent searches
No recent searches
JWT authentication, no email-address in user-profile
Posted Jul 11, 2022
Hi team,
We are using JWT authentication for end-users in our app. That way they can start chatting with us right away without providing their personal information. (Or so we thought)
However, even when adding the email address to the JWT payload, the email address is not carried over to the Zendesk end-user profile.
let payload = {
name: 'Example Person',
email: 'some@example.com',
external_id: '123',
scope: 'user'
};
var token = await jwt.sign(payload,
'xxxxxxxxREPLACEDxxxxxxxxx',
{ header: { kid: "xxxxxxxxREPLACEDxxxxxxxxx" } });
This works really well and the enduser does get the little green tick as seen below:
But only the name seems to be added to their profile.
This rings true for the Webwidget and both mobile SDKs.
So at the moment, we are still asking our users for their email addresses via chat. But this is less than perfect. Any idea?
Thanks
1
7
7 comments
Greg Katechis
0
Vinicius
Greg Katechis any news?
0
Greg Katechis
Hi Vinicius! This has been functional in product for some time now…are you experiencing any issues here?
0
Vinicius
Greg Katechis, I can authenticate my end-users on messaging chat (I noticed they don't need to fill the email input when they are authenticated), but they don't have email when ticket is created.


The contact is empty.
0
Vinicius
Greg Katechis, I did the test again, and still the same problem.







Request to my jwt server:
I'm receiving the token:
Login process:
Creating ticket:
User profile:
Empty email.
0
Greg Katechis
It looks like you are not passing in the `email_verified`attribute, which may be causing this. Take a look at our documentation here and see if that helps!
0
Vinicius
Greg Katechis nice catch, it worked here!
0