Nagging Penguin Matriarchs
Unleash awesomeness. Private packages, team management tools, and powerful integrations. Get started with npm Orgs »

derby-auth-gravatar

0.2.0 • Public • Published

derby-auth-gravatar

Add Gravatar support to derby-auth.

Installation

First follow the steps for getting started with derby-auth.

Next require the module in server/index.js:

var gravatar = require('derby-auth-gravatar');

Add gravatar after derby-auth middleware:

// derby-auth middleware
.use(auth.middleware(strategies, options)) 
 
// gravatar middleware
.use(gravatar(store))

Usage

A user's gravatar data is stored in "users.*.auth.local.gravatar". Each gravatar object contains a hash property that can be used to generate a gravatar image url

<img alt="" src="https://www.gravatar.com/avatar/{{_user.auth.local.gravatar.hash}}">

If a user has a profile then their profile data will also be stored in the gravatar object.

<pre class="displayName">{{_user.auth.local.gravatar.name.formatted}}</pre>

*Note: For whatever reason, secondary gravatar accounts do not return profile data.

Keywords

none

install

npm i derby-auth-gravatar

Downloadsweekly downloads

7

version

0.2.0

license

none

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability