-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Send magic link without API call? #35
Comments
I'd love to have that possibility too. |
@adrianbienias I've implemented a solution to this by adding a new const { href, code } = magicLogin.create('my.email@foo.com');
console.log(`Magic link is ${href} and verification code is ${code}`); I've created a pull request, but in the meantime you're welcome to use my fork:
|
@neilrackett, thanks for sharing your solution. |
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
send()
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:
magicLogin.send('foo@bar.com')
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; ormagicLogin.getMagicLink('foo@bar.com')
to generate a magic link URL to be used elsewhereThe text was updated successfully, but these errors were encountered: