Hey, I’m creating this thread because I’m not getting the given_name and family_name on the IdToken using the apple connection.
I read this ticket with a similar issue (LastName FirstName in token with apple-signin - #9 by codenameredpanda), taking the idea from there i write the following action without luck (I’m getting not firstname and not last_name on the idToken).
const { user } = event;
if (event.connection.strategy === "apple") {
api.idToken.setCustomClaim('given_name', user.first_name || 'not firstname');
api.idToken.setCustomClaim('family_name', user.last_name || 'not last_name');
}
return { user };
};
I also try to debug a logging the user object included on the event but there was no name related information there
I’m using development keys and testing with the “Try Connection” button on the apple connection.
I did try to completely delete the account on auth0 and remove the connection on my Apple ID, but there was no effect. ( as is mentioned here Apple review requirement for firstName and lastName - #5 by lihua.zhang)
This is an example of what I’m getting on the idToken
{
"sub": "apple|000965.a13368916e6a44a9af796510610XXXX4.1937",
"given_name": "not last_name",
"family_name": "not last_name",
"nickname": "thejuasz",
"name": "thejuasz@gmail.com",
"picture": "https://s.gravatar.com/avatar/b9ba3706674645f2f2c5ffe1a9661b17?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fth.png",
"updated_at": "2023-07-12T00:34:19.719Z"
}
I’m totally sure that I’m sharing my name and email on my apple account
What could I do?
Thanks in advance