709a1cce4e
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. |
||
---|---|---|
.. | ||
test | ||
.eslintrc.js | ||
index.js | ||
LICENSE | ||
package.json | ||
README.md | ||
yarn.lock |
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.
git clone
this repo &cd
into it as usual- Run
yarn
to install top-level dependencies.
Run
yarn dev
Test
yarn lint
run just eslintyarn test
run lint and tests
Copyright & License
Copyright (c) 2018-2019 Ghost Foundation - Released under the MIT license.