4.0.15 • Published 5 months ago

strapi-plugin-passwordless v4.0.15

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

stand with Ukraine

Strapi PasswordLess Plugin

The plugin verified by Strapi The plugin verified by Strapi

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.

Screenshot

⏳ Installation

Install Strapi with this Quickstart command to create a Strapi project instantly:

# with yarn
yarn create strapi-app my-project --quickstart

# with npm/npx
npx create-strapi-app my-project --quickstart
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.

🔌 Usage

REST API

Email user with login link

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"
}

Login with token

GET /api/passwordless/login?loginToken={tokenFromEmail}

Response:

{
  "jwt":  "...jwt auth token..."
  "user": {
    ...strapi user...
  },
  "context": {
    ... context, provided to sendlink, e.g. currentPage, sessionId etc.
  }
}

GraphQL API

WIP

🙌 Versions

  • strapi-plugin-passwordless@4.x - version for strapi v4
  • strapi-plugin-passwordless@3.x - version for strapi v3 (dev branch)

🤝 Contributing

Feel free to fork and make a Pull Request to this plugin project. All the input is warmly welcome!

⭐️ Show your support

Give a star if this project helped you.

License

MIT License Copyright (c) Andrey Kucherenko.

4.0.15

5 months ago

4.0.14

7 months ago

4.0.10

12 months ago

4.0.12

12 months ago

4.0.11

12 months ago

4.0.13

9 months ago

4.0.9

1 year ago

4.0.7-0

2 years ago

4.0.6-1

2 years ago

4.0.8-0

2 years ago

4.0.6-0

2 years ago

4.0.8

2 years ago

4.0.7

2 years ago

4.0.6

2 years ago

4.0.5

2 years ago

4.0.4

2 years ago

4.0.4-0

2 years ago

4.0.3

2 years ago

4.0.2

2 years ago

4.0.2-2

2 years ago

4.0.2-1

2 years ago

4.0.2-0

2 years ago

4.0.1

2 years ago

4.0.0

2 years ago

4.0.0-1

2 years ago

4.0.0-0

2 years ago

3.0.1

2 years ago