mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Change passwordless loginWithToken method name to passwordlessLoginWithToken (#11766)
* Change passwordless loginWithToken method name to passwordlessLoginWithToken. This difference is needed to not overwrite the loginWithToken from accounts-base. * Major version bump for passwordless package. * Fix passwordless documentation about loginWithToken.
This commit is contained in:
committed by
filipenevola
parent
d34a624b59
commit
5286068dd9
@@ -10,7 +10,7 @@ The first step to in the passwordless process is for the user to sign-up or requ
|
||||
|
||||
If the user is signing up you can pass in the `userData` object like in [Accounts.createUser](/api/passwords.html#Accounts-createUser).
|
||||
|
||||
{% apibox "Meteor.loginWithToken" %}
|
||||
{% apibox "Meteor.passwordlessLoginWithToken" %}
|
||||
The second step in the passwordless flow. Like all the other `loginWith` functions call this method to login the user with the token they have inputted.
|
||||
|
||||
{% apibox "Accounts.sendLoginTokenEmail" %}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Package.describe({
|
||||
summary: 'No-password login/sign-up support for accounts',
|
||||
version: '1.0.0',
|
||||
version: '2.0.0',
|
||||
});
|
||||
|
||||
Package.onUse(api => {
|
||||
|
||||
@@ -41,7 +41,7 @@ const transformSelector = selector => {
|
||||
* on failure.
|
||||
* @importFromPackage meteor
|
||||
*/
|
||||
Meteor.loginWithToken = (selector, token, callback) => {
|
||||
Meteor.passwordlessLoginWithToken = (selector, token, callback) => {
|
||||
Accounts.callLoginMethod({
|
||||
methodArguments: [
|
||||
{
|
||||
@@ -91,7 +91,7 @@ const checkToken = ({ selector, token }) => {
|
||||
const userId = Tracker.nonreactive(Meteor.userId);
|
||||
|
||||
if (!userId) {
|
||||
Meteor.loginWithToken(selector, token, () => {
|
||||
Meteor.passwordlessLoginWithToken(selector, token, () => {
|
||||
// Make it look clean by removing the authToken from the URL
|
||||
if (window.history) {
|
||||
const url = window.location.href.split('?')[0];
|
||||
|
||||
Reference in New Issue
Block a user