Ghost/ghost/members-api
Fabien 'egg' O'Carroll 6957c2725b Refactored magic-link to be more generic (#202)
no-issue

This removes the concept of `subject` & `payload` from the function
signatures, making the implementation a little more generic, and less
JWT centric.

We also replace getUserFromToken and getPayloadFromToken with a single
method getDataFromToken, which will contain all the necessary data.

* Updated members-api to use new magic-link module

This updates the usage of magic-link to work with the new interface

* Fixed labels not saving for new members

Due to how bookshelf-relations works, we must fetch the labels before
saving a member, otherwise the labels are all deleted.

* Used a proper class rather than constructor function

This just moves the code to a more modern standard

* Updated methods to be async

This prepares us for a future where token generation and validation may
require access to storage and thus be an asyncronous operation
2020-09-17 15:42:01 +01:00
..
lib 🐛 Fixed create and update user methods to account for created_at and subscribed fields 2020-08-24 18:29:03 +12:00
test Store geolocation data during member signup/signin (#128) 2020-02-27 10:29:36 +00:00
.eslintrc.js Added default test dir and eslintrc 2019-05-07 17:35:17 +02:00
index.js Refactored magic-link to be more generic (#202) 2020-09-17 15:42:01 +01:00
package.json Published new versions 2020-08-24 18:31:02 +12:00
tsconfig.json Published new versions 2020-06-18 18:03:46 +02:00