Meteor OAuth lea
OAuth service configuration and handling for logging in with lea (your custom OAuth server).
This package will be automatically added by adding lea accounts via
$ meteor leaonline:accounts-lea
Define the ServiceConfig
If you want to login in with lea your client app needs to define the ServiceConfiguration
:
1/* global ServiceConfiguration */ 2import { Meteor } from 'meteor/meteor' 3 4Meteor.startup(() => { 5 const { oauth } = Meteor.settings 6 ServiceConfiguration.configurations.upsert( 7 { service: 'lea' }, // required 8 { 9 $set: { 10 // required fields: 11 loginStyle: 'popup', 12 clientId: oauth.clientId, 13 secret: oauth.secret, 14 dialogUrl: oauth.dialogUrl, 15 accessTokenUrl: oauth.accessTokenUrl, 16 identityUrl: oauth.identityUrl, 17 redirectUrl: oauth.redirectUrl, 18 // additional fields injected into profile 19 // optional; these are just examples: 20 identity: [ 21 'firstName', 22 'lastName', 23 ], 24 25 // additional fields, injected into user.services.lea 26 // optional; these are just examples: 27 extraFields: [ 28 'roles' 29 ] 30 } 31 } 32 ) 33})
License
MIT, see license file