I'm the creator of this project and I'm Ukrainian.
My country, Ukraine, is being invaded by the Russian Federation, right now. I've fled Kyiv and now I'm safe with my family in the western part of Ukraine. At least for now. Russia is hitting target all over my country by ballistic missiles.
Please, save me and help to save my country!
Ukrainian National Bank opened an account to Raise Funds for Ukraine’s Armed Forces:
SWIFT Code NBU: NBUA UA UX JP MORGAN CHASE BANK, New York SWIFT Code: CHASUS33 Account: 400807238 383 Madison Avenue, New York, NY 10179, USA IBAN: UA843000010000000047330992708
You can also donate to charity supporting Ukrainian army.
THANK YOU!
A plugin for Strapi Headless CMS that provides ability to sign-in/sign-up to an application by link had sent to email. A plugin works together with Strapi User Permissions Plugin and extends it functionality. For working with emails a plugin use Strapi Email Plugin.
Install Strapi with this Quickstart command to create a Strapi project instantly:
- (Use yarn to install the Strapi project (recommended). Install yarn with these docs.)
# with yarn
yarn create strapi-app my-project --quickstart
# with npm/npx
npx create-strapi-app my-project --quickstart
-
Configure the
Strapi email
plugin ( official documentation ) -
Add the
strapi-plugin-passwordless
plugin
yarn add strapi-plugin-passwordless@latest
# or
npm i -S strapi-plugin-passwordless@latest
- After successful installation you've to build a fresh package that includes plugin UI. To archive that simply use:
yarn build && yarn develop
# or
npm run build && npm run develop
- or just run Strapi in the development mode with
--watch-admin
option:
yarn develop --watch-admin
#or
npm run develop --watch-admin
The Passwordless plugin should appear in the Plugins section of Strapi sidebar after you run app again.
POST /api/passwordless/send-link
{
"email": "user@email.com"
"username": "John Bull" // username for new user
"context": {
// context of authentification, optional parameter e.g. "currentUrl": "...my page..."
...
}
}
Send mail to user by username
POST /api/passwordless/send-link
{
"username": "John Bull"
}
GET /api/passwordless/login?loginToken={tokenFromEmail}
Response:
{
"jwt": "...jwt auth token..."
"user": {
...strapi user...
},
"context": {
... context, provided to sendlink, e.g. currentPage, sessionId etc.
}
}
WIP
strapi-plugin-passwordless@4.x
- version for strapi v4strapi-plugin-passwordless@3.x
- version for strapi v3 (dev branch)
Feel free to fork and make a Pull Request to this plugin project. All the input is warmly welcome!
Give a star if this project helped you.
MIT License Copyright (c) Andrey Kucherenko.