Accounts-Zoho
=========================
A login service for ZOHO for Meteor app.
Installation
In a Meteor app directory, enter:
meteor add settlin:accounts-zoho
Define the Service Configuration
For sign in with ZOHO your app needs to define the ServiceConfiguration
in server
After Meteor 2.7 we can use Meteor settings for setting your services under Meteor.settings.serviceConfig.zoho
. All the properties can be set under the service and will be added to the database as is, so make sure that they are correct. For the example:
1{ 2 "serviceConfig": { 3 "zoho": { 4 "clientId": "12345", 5 "authUrl": "https://accounts.zoho.com/oauth/v2/auth", 6 "accessTokenUrl": " https://accounts.zoho.com/oauth/v2/token", 7 "secret": "xyz12345", 8 "redirectUrl": "/_oauth/zoho" 9 } 10 } 11}
1import { Meteor } from 'meteor/meteor' 2import {ServiceConfiguration} from 'meteor/service-configuration'; 3 4Meteor.startup(() => { 5 const { serviceConfig: {zoho} = {} } = Meteor.settings 6 ServiceConfiguration.configurations.upsert( 7 { service: 'zoho' }, 8 { 9 $set: { 10 //Mandotary fileds 11 loginStyle: 'popup', 12 clientId: zoho.clientId, 13 secret: zoho.secret, 14 authUrl: zoho.authUrl, 15 accessTokenUrl: zoho.accessTokenUrl, 16 redirectUrl: zoho.redirectUrl, 17 //Optional: extra fields to be inserted in profile 18 profile: [ 19 'firstName', 20 'lastName', 21 ], 22 } 23 } 24 ) 25})
License
MIT, see license file