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 19 // additional fields injected into profile 20 // optional; these are just examples: 21 identity: [ 22 'firstName', 23 'lastName', 24 ], 25 26 // additional fields, injected into user.services.lea 27 // optional; these are just examples: 28 extraFields: [ 29 'roles' 30 ], 31 32 // enable some debugging messages in consoles 33 debug: true, 34 } 35 } 36 ) 37})
Changelog
2.0.0
- Meteor 3 compatibility
- read
debugflag from service config to enable debugging
License
MIT, see license file