User Name / Image / Sub etc for Custom Social Connection (Pinterest)

Hi there,

I have a Custom Social Connection extension up and running but could really do with a pointer as to how to get the “standard” fields stored on the User meta for other social connections.

Is there any instructions about how to store this from the extension ?

Thanks.

Hey there @NigelGodfrey, what does your current scope look like when trying to leverage stored fields? I also have linked some of the standard documentation when it comes to Custom Social Connections. Thank you in advance!

https://auth0.com/docs/connections/social/oauth2
https://auth0.com/docs/extensions/custom-social-extensions

So currently we have a rule for the various “built in” social platforms (twitter/linkedin/facebook in our case) that saves the oauth token(s) on the user.

However the auth0 standard user in these cases already has name/image/sub that we use throughout our app to identify the user’s platforms.

That all works really well, but I don’t know how to make this work with Custom Social connection to Pinterest. How do I create fields on the “user” from the Custom COnnection ?

You can add set attributes in the user profile at the ‘Fetch User Profile Script’ code in the extension. For example, if you want to add an app_metadata attribute during login, add these two lines:

    profile.app_metadata = profile.app_metadata || {};
    profile.app_metadata.pqr = profile.avatar;

Here, pqr is the attribute name you need, and profile.avatar is its value - assuming the social identity provider sends an ‘avatar’ attribute in the user profile.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.