How to search a user by its twitter screen_name? (Since Twitter integration was never fixed)

The existing Twitter integration puts the actual ‘username’ into the ‘screen_name’ field on a user profile. I saw posts reporting this behavior a long time ago but it was never fixed.

How can I search for a user using Lucene syntax by its ‘screen_name’ property?

The current username search would require me to know the numeric twitter ID for every user which kind of defeats the purpose of searching in the first place.

image

1 Like

I fixed created an Action Trigger on post-login

exports.onExecutePostLogin = async (event, api) => {
  const { screen_name } = event.user;

  if (event.authorization) {
    // Set claims 
    api.idToken.setCustomClaim(`screen_name`, screen_name);
  }
};