Package Exports
- grant-profile
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (grant-profile) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
grant-profile
User Profile plugin for Grant
NOTE: For grant-profile as a middleware for Express, Koa, and Hapi see v0.x branch
Use
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')]
})Configuration
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.
Response Data
Additional profile key will be added to your response data containing the user profile.