Expand my Community achievements bar.

Filling avatar on profile by custom login provider

Avatar

Level 1

Hi,

I'm implement a custom provider (com.adobe.granite.auth.oauth.Provider), and i want save  the avatarUrl of user in profile. I check the node profile under user and the resourceType is 

cq/security/components/profile

When user is created, i can save email, name, id, but if i put other field such 'picture', 'photo', 'avatarURL' this field is ignored.

Anyone know what properties i can save on this resourceType?

 

I'm based in this example https://github.com/techforum-repo/aem-bundles/blob/master/linkedin-oauth-provider/src/main/java/com/...

 

Thanks

2 Replies

Avatar

Community Advisor

Profile node(cq/security/components/profile) is of type=nt:unstructured which mean you should be able to save any properties on it. I tried adding custom properties from CRXDE on different user profiles and it worked. If we are able to add property from CRXDE then we  should be able to add from code as well.

Please check the permission of system user you are using to update different profiles.

Avatar

Level 1

Hi @Sachin_Arora_ ,

Thanks for your reply,

But you know the handler that calls the custom provider?, because the creation of user are doing by this handler, and this code provably ignore some properties of user that i return in provider.

 

Thanks