Last 12 weeks · 0 commits
2 of 6 standards met
Repository: mxstbr/passport-magic-login. Description: Passwordless authentication with magic links for Passport.js. Stars: 671, Forks: 43. Primary language: TypeScript. Languages: TypeScript (100%). License: MIT. Topics: authentication, express, magiclink, passport. Open PRs: 0, open issues: 16. Last activity: 8h ago. Community health: 42%. Top contributors: mxstbr, eric-burel, tmkn, maraisr, andyrichardson, JackCA, lauridskern, marcusvmsa, ramrami, rfbowen and others.
TypeScript
It's probably unsafe to let the link be used multiple times. Can we limit it to once per link?
Thank you for your great work on this strategy! Is there an existing way to send or generate a magic link using just JavaScript, without needing to do it via a POST/GET call (which the current method is specifically designed to do)? It would be great to be able to send or generate magic links from within a custom API endpoint, for example: to send an email notification to a user telling them that a document is available that included a magic link that takes them straight to it; _or_ to generate a magic link URL to be used elsewhere
Typescript complains when using this with Passport. Exporting unprivatises it and TS is happy.
This pull request resolves issue #35 by adding a new method to the class that enables developers to generate magic links in code rather than having to call an API endpoint. This method can be called with either a string or object parameter, depending how much you would like to store in the related JWT token, for example In addition, this pull request resolves a number of build issues caused by the outdated dependency, which has been replaced with the more up-to-date fork.