Commit Graph

8 Commits

Author SHA1 Message Date
Daniel Lockyer
308a28d31a
Tidied up package READMEs
refs https://github.com/TryGhost/Toolbox/issues/354

- these READMEs were migrated over from when each package was in a
  different repo
- they also assume you're going to be publishing the packages because it
  mentions install instructions
- only a few of them contain custom content
- this commit deletes the majority of these files because they're now
  not useful
- any that contained other instructions have been cut down
2022-07-25 15:17:12 +02:00
John O'Nolan
b7cd251d5c 2022 2022-01-06 10:09:25 +00:00
John O'Nolan
0e0b2f3cb2 2021 2021-01-25 16:34:32 +00:00
Fabien O'Carroll
97ceb13d42 Moved JWTTokenProvider to lib and exported from index
no-issue

This brings the module in line with our current package standards.
2020-09-18 13:20:12 +01:00
Fabien O'Carroll
de7f5c1383 Updated README to reflect API changes
no-issue
2020-09-18 12:42:31 +01:00
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
John O'Nolan
a122aa0119 2020 2020-01-07 19:06:08 +00:00
Fabien O'Carroll
fa54dc569e Created @tryghost/magic-link module (#50)
* slimer create magic-link

Created the initial magic-link project

* Added usage section to README

* Installed types and deps for magic-link

* Added tsconfig.json

* Initial commit for magic-link module

* Renamed hello.test.js -> index.test.js

* Added initial basic test

* Removed test util directory

* Updated ecmaVersion for test eslint parserOptions

* Added tests for MagicLink

* Added language to README usage codeblock

* Updated sendMagicLink to return SentMessageInfo

* Updated README

* Updated README usage example

* Fixed types
2019-09-03 11:07:03 +08:00