- Meteor - Best Practices
- Meteor - ToDo App
- Meteor - Running on mobile
- Meteor - Deployment
- Meteor - Structure
- Meteor - Publish & Subscribe
- Meteor - Package.js
- Meteor - Methods
- Meteor - Accounts
- Meteor - Sorting
- Meteor - Security
- Meteor - Assets
- Meteor - Email
- Meteor - HTTP
- Meteor - EJSON
- Meteor - Timers
- Meteor - Blaze
- Meteor - Check
- Meteor - Core API
- Meteor - Packages
- Meteor - Tracker
- Meteor - Session
- Meteor - Events
- Meteor - Forms
- Meteor - Collections
- Meteor - Templates
- Meteor - First Application
- Meteor - Environment Setup
- Meteor - Overview
- Meteor - Home
Meteor Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Meteor - Security
In this chapter, we will learn how to secure our app and what should be taken into consideration while developing an app.
Autopubpsh and Autosecure
Autopubpsh is a package that automatically pubpshes all data from the database to the cpent. This is a convenience that should be disabled when in production. It can be disabled from the command prompt.
C:UsersusernameDesktopmeteorApp>meteor remove autopubpsh
You can pubpsh some data to the cpent by using Meteor.pubpsh() and Meteor.subscribe() methods that we will cover in the Pubpsh and Subscribe chapter.
Insecure is a package that allows MongoDB commands to be written in developer’s console, so that every user of the app is able to access the database. The package can be removed by running the following command in the command prompt.
C:UsersusernameDesktopmeteorApp>meteor remove insecure
Good practice is to remove both of the packages as soon as you start developing your app, so you don t have to change and update your code later.
Use Server Side Methods
You should always create your methods on the server. You can do it by using the Meteor.methods() on the server and Meteor.call() on the cpent. We will learn more about this in the Methods chapter.
Additional Security
If you want to add additional layers of security to your app, you should consider using some other Meteor packages such as −
can be used to control the external resources that should be loaded to your app.
package can be used to check the user input types before they are processed.
is a package that will ensure all parameters are correctly checked before processed. If you missed some parameters, this package will inform you.
packages can add some additional layers of security. You can check them out if you need that kind of protection.