Ghost/ghost/sdk/layer1
Fabien O'Carroll 709a1cce4e Updated layer1 to pass fresh param to gateway
no-issue

This is needed so that we can request a brand new token from layer1, in
the instance of knowing user data has changed, we can have a token whihc
reflects it.
2019-03-25 09:35:07 +01:00
..
test Created members-layer1 sdk base structure 2018-11-09 13:24:16 +05:30
.eslintrc.js Created members-layer1 sdk base structure 2018-11-09 13:24:16 +05:30
index.js Updated layer1 to pass fresh param to gateway 2019-03-25 09:35:07 +01:00
LICENSE 2019 2019-01-01 14:38:49 +00:00
package.json Updated member layers (#23) 2018-12-04 09:24:04 +05:30
README.md 2019 2019-01-01 14:38:49 +00:00
yarn.lock Updated member layers (#23) 2018-12-04 09:24:04 +05:30

Members - Layer 1

Install

npm install @tryghost/members-layer1 --save

or

yarn add @tryghost/members-layer1

Usage

const Members = require('@ghost/members-layer1');

const members = Members(options);

// returns Promise.resolve(token|null) if they are logged in or not
members.getToken();

// returns Promise.resolve(true|false) on whether it worked or not
members.logout();

// returns Promise.resolve(true|false) on whether it worked or not
members.login();

Develop

This is a mono repository, managed with lerna.

Follow the instructions for the top-level repo.

  1. git clone this repo & cd into it as usual
  2. Run yarn to install top-level dependencies.

Run

  • yarn dev

Test

  • yarn lint run just eslint
  • yarn test run lint and tests

Copyright & License

Copyright (c) 2018-2019 Ghost Foundation - Released under the MIT license.