Javascript Meteor

Announcing Meteor 2.5 with Cordova 10, accounts-passwordless, and much more!4 min read

With Meteor Impact we also have for you a new Meteor release!

Cordova 10

Users of Cordova can now enjoy the latest Cordova v10 for Android, which now enables AndroidX. Be aware that if you use any Cordova-plugin that depends on or uses any old support library, you need to include the Cordova-plugin-androidx-adapter for Cordova-plugin; otherwise, you will get build errors.

In addition to the Cordova upgrade, you’ll find that mobile packages like mdg:camera and mdg:geolocation have been updated with new features and are compatible with this Cordova upgrade.

accounts-passwordless

Ongoing work on the accounts system brings us a new package in this release, accounts-passwordless. As the name suggests, this package adds the ability for the user to sign-up/in without the need for a password. Only an e-mail address is needed, which receives a code that the user can enter on the sign-in page or use a link to get signed in without that hassle. It’s straightforward to tap into this package and change instead of sending codes to a phone number. Check out Filipe’s & Renan’s stream that covers these two topics in detail.

Other packages have been updated to be aware of this package as well like accounts-ui.

And new packages were created like quave:accounts-passwordless-react, with this package you can add password less authentication with a few lines of code:

import React from ‘react’;
import { useHistory } from ‘react-router-dom’;
import { Passwordless } from ‘meteor/quave:accounts-passwordless-react’;

export const Access = () => {
const history = useHistory();

const onEnterToken = () => {
history.push(‘/’);
openAlert(‘Welcome!’);
};

return (
<Passwordless
onEnterToken={onEnterToken}
/>
);
};

It’s possible to use this package with SMTP configuration in Meteor. Still, if you prefer to use Postmark as a provider using their API, there is a new package quave:email-postmark that replaces the transport layer of Meteor by Postmark API.

If you prefer Text messages (SMS) instead of emails, there is also a new package for that quave:accounts-passwordless-SMS-Twilio using Twilio.

These last three packages are community packages; feel free to use their code as an inspiration to create new integrations, for example, password-less UI for Vue.js or Svelte. Or new provider implementations for SMS or Email.

Accounts configs

Continuing on accounts improvements new way of setting config options has been added. Till now, you had to set Accounts manually.config, now you can define these settings in your Meteor config for them to be automatically set. You can do that under Meteor.settings.packages.accounts-base; the same applies for service configuration. You can define OAuth service options in Meteor settings. They will be added to the database automatically without manually creating upsert functions like you had to till now. A sample config for Weibo would look like this:

{
“packages”: {
“service-configuration”: {
“weibo”: {
“loginStyle”: “popup”,
“clientId”: “1292962797”,
“secret”: “75a730b58f5691de5522789070c319bc”
}
}
}
}

Make sure to check out the documentation of the OAuth package for the correct keys to use.

HMR updates

Per our usual round of updates, we have some significant updates related to hot module replacement! HMR is now available on all architectures and in legacy browsers.

Also, we fixed a delay that we had in the first change detection; it could take up to 5 seconds to detect the first change, but this is now resolved, and the detection will be immediate.

Node 14.18.1

Node has been updated to the latest v14, featuring October 12th 2021 security release. This means that since Meteor 2.5 this includes Node 14.18.0 and v14.18.1.

Documentation and Guide in Meteor repository

Along with all these updates, we have been hard at work re-organizing Meteor repositories. The most notable is that Documentation and Guide are now part of the main Meteor GitHub repository. This will make it easier to make complete Pull Requests with documentation and Guide changes.

We have also unified many NPM packages repos, as they are used in Meteor it makes more sense to keep them in the same repository. Update today!

You can update to Meteor 2.5 today by running

meteor update –release 2.5

to enjoy these and other improvements and fixes in the latest addition to Meteor!

Announcing Meteor 2.5 with Cordova 10, accounts-passwordless, and much more! was originally published in Meteor Blog on Medium, where people are continuing the conversation by highlighting and responding to this story.

Pin It on Pinterest

Generated by Feedzy