Skip to content

renzosunico/adonis5-gigya

Repository files navigation

Adonis5-Gigya

Service provider for AdonisJs 5

npm-image license-image typescript-image

Gigya service provider for AdonisJs 5. This uses the unofficial SDK of Gigya as there are no official SDK yet. Here are the links for the SDK used: Github and NPM.

Table of contents

Installation

npm i --save adonis5-gigya

Connect all dependences:

node ace invoke adonis5-gigya

Compile your code:

npm run build

For other configuration, please update the config/gigya.ts.

Sample Usage

After loading all providers Gigya service will be initialized. After this you can import Gigya service anywhere in your application in such way:

 import Gigya from '@ioc:Gigya'

Then you will now be able to access the Gigya SDK from here

import Gigya from '@ioc:Gigya'

export default class UserController {
  public async getUser () {
    const user = await Gigya.accounts.getAccountInfo({
      UID: 'UID-OF-THE-USER'
    })
  }
}

For additional details of Gigya SDK, please check the Gigya SDK documentation by this link Gigya docs