mirror of
https://github.com/meteor/meteor.git
synced 2026-01-07 23:04:13 -05:00
Add documentation for accounts-passwordless
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
Labels are used to organize our issues and PRs.
|
||||
|
||||
We should change the labels of issues and PRs when its status changes.
|
||||
We should change the labels of issues and PRs when their status changes.
|
||||
|
||||
### Status Labels
|
||||
Labels to indicate the status of a specific issue or PR. These are the most important labels as they tell us in which stage a specific item is at the moment at a glance.
|
||||
|
||||
@@ -55,6 +55,7 @@ sidebar_categories:
|
||||
- api/environment
|
||||
Packages:
|
||||
- packages/accounts-ui
|
||||
- packages/accounts-passwordless
|
||||
- packages/appcache
|
||||
- packages/audit-argument-checks
|
||||
- packages/autoupdate
|
||||
|
||||
20
docs/source/packages/accounts-passwordless.md
Normal file
20
docs/source/packages/accounts-passwordless.md
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
title: accounts-passwordless
|
||||
description: Documentation of Meteor's `accounts-passwordless` package.
|
||||
---
|
||||
|
||||
Passwordless package allows you to create a login for users without the need for user to provide password. Upon registering or login an email is sent to the user's email with a code to enter to confirm login and a link to login directly.
|
||||
|
||||
{% apibox "Meteor.loginWithToken" %}
|
||||
{% apibox "Accounts.requestLoginTokenForUser" %}
|
||||
{% apibox "Accounts.sendLoginTokenEmail" %}
|
||||
|
||||
### E-mail templates
|
||||
|
||||
`accounts-passwordless` brings new templates that you can edit to change the look of emails which send code to users. The email template is named `sendLoginToken` and beside `user` and `url`, the templates also receive a data object with `sequence` which is the user's code.
|
||||
|
||||
```javascript
|
||||
sendLoginToken: {
|
||||
text: (user, url, { sequence }) => { /* text template */ }
|
||||
}
|
||||
```
|
||||
@@ -62,12 +62,12 @@ Meteor.loginWithToken = (selector, token, callback) => {
|
||||
/**
|
||||
* @summary Request a login token.
|
||||
* @locus Client
|
||||
* @param selector
|
||||
* @param userData
|
||||
* @param {Object} selector
|
||||
* @param {Object} userData
|
||||
* @param {Object} options
|
||||
* @param {String} options.selector The email address to get a token for or username or a mongo selector.
|
||||
* @param {String} options.userData When creating an user use this data if selector produces no result
|
||||
* @param {String} options.options. For example userCreationDisabled.
|
||||
* @param {String} options.options For example userCreationDisabled.
|
||||
* @param {Function} [callback] Optional callback. Called with no arguments on success, or with a single `Error` argument on failure.
|
||||
*/
|
||||
Accounts.requestLoginTokenForUser = (
|
||||
|
||||
@@ -210,7 +210,7 @@ Meteor.methods({
|
||||
* @locus Server
|
||||
* @param {String} userId The id of the user to send email to.
|
||||
* @param {String} sequence The token to be provided
|
||||
* @param {String} email. Which address of the user's to send the email to.
|
||||
* @param {String} email Which address of the user's to send the email to.
|
||||
* @param {Object} [extra] Optional. Extra properties
|
||||
* @returns {Object} Object with {email, user, token, url, options} values.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user