This extension adds a passwordless method to authenticate users in your app. It works like this:
- User enters email
- App sends a token to user's email
- User clicks on the link inside the email
- The app checks the token and returns an authentication token
- Done!
Extensions installation instructions
First, you need to define user authentication provider as here
This extension adds settings to the user settings.
- login
- expiresIn: '15 mins' — string, login token expiration time
- subject — string, login token email subject (Tip: if no subject defined
mail
takes the subject from the<title>
tag in the email) - template — string, the path to login token email template
Sends authentication token to the email
Request
- email — user's email
- data — additional data to add to the token
- redirect — redirect URL. You can use it to return a user to the page he logged in from.
Response
- true — if token send
NotFound
error, code 4540 — when user not found
Authenticates the user and returns authentication token to use with API.
Request
token from email
Response
-
token — authentication token
-
expires — timestamp when token will expire
-
redirect — URL, where the user logged in from
-
Unauthorized
error, code 4100 — when no user authenticated
License MIT;