Meteor to get a profile picture for the current user, regardless of platform

There are questions about getting a profile image from Twitter , Facebook, or Google , but it would be nice if there was a simple and extensible shell that returned a profile image regardless of the current service of the user account.

+6
source share
3 answers

At the same time, there is an Atmosphere package that returns a user profile image and works for many auth services:

bengott: avatar

+3
source

I think you would like to customize your user profile picture yourself. Since services do not have a standard way of storing a profile image. And meteor oauth does not have a required code for each class of service.

You can install it when creating an account. This will require writing code for each service.

Accounts.onCreateUser(function (options, user) { if (user.services.google !== undefined) { user.profile.profile_picture = user.services.google.picture; } if (user.services.twitter !== undefined) { user.twitter.profile_picture = user.services.twitter.profile_url; // sudo param name } return user; }) 

or publish.

+3
source

Instead of bengott: avatar (which is no longer recommended) use the utilities: avatar instead

You can also see accounts-meld package.

0
source

Source: https://habr.com/ru/post/953909/


All Articles