Meteor Password Protect complete Application

939 views Asked by At

Can I "Password-Protect" my whole Meteor Application something like "htaccess" in PHP?

For example: I don't want the public to have access to my site, but the client wants to see it.

1

There are 1 answers

0
Sven Delueg On BEST ANSWER

DidnĀ“t recognize that this is the answer. First Google hit. https://github.com/Jabbslad/basic-auth

EDIT:

In fact very Simple.

Add the package.

meteor add jabbslad:basic-auth

add this code in serverside code

var basicAuth = new HttpBasicAuth("guest", "password");
basicAuth.protect();

There are some more options you can see in the repository readme.md