Pages

Thursday, May 26, 2016

Learning Meteor.js [Part 25]: Add authentication using 'Accounts' package

Meteor did a great job to get users get started with its authentication story. The default package not only gives you a usable UI it makes it very simple to configure which ever provider you want to use.

Check it out, the UI of the package contains the instructions of how to set up the authentication provider and it can self configure once you give it the clientID and secret. I can't imagine how it could be simpler.


All I had to do to get this to work is add this template in my view:
<div class="navbar-right login">
      {{> loginButtons}}
</div>

You can checkout the source up to this point by using this commit or you can visit the live demo and log in with your google account.


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.