So I’ve read in the authentication api docs that I can get user info from the /userinfo end-point, but the response that I get from said end-point does not match the sample given in the documentation, even though I’ve used openid, email, and profile scope. how do I get atleast the preferred_username as seen in the response sample in the documentation?
Thanks for pointing this out - preferred_username doesn’t exist as an attribute on the Auth0 profile. I think that might just be an example of a custom claim, where preferred_username is added to an ID token using the event.user.username:
That should get the username in the ID token and subsequently in the /userinfo response. This assumes a connection has been configured to require a username in the first place.