User Profile plugin for Grant
NOTE: For grant-profile as a middleware for Express, Koa, and Hapi see v0.x branch
Pass your Grant configuration as the config
key, and the grant-profile plugin as item in the extend
array:
var Grant = require('grant-express|koa|hapi')
var grant = Grant({
config: require('./config.json'),
extend: [require('grant-profile')]
})
Grant Profile supports one additional configuration option called profile_url
, that can be set for any provider.
The profile_url
have to be set for custom providers.
It also can be used to override or set the profile_url
for existing providers. Note that in some cases a custom logic might be needed for the internal HTTP client.
Not all of the supported providers in Grant are tested here, or have the correct profile URL set. Check out the configuration for current status.
Additional profile
key will be added to your response data containing the user profile.