A collection of services and directives to use with Mozilla Persona
0 people use it


angular-persona is a collection of services and directives to make easy the integration with Mozilla Persona.


To use angular-persona you have to:

  1. include in your index.html the Persona javascript library

    <script src=""></script>

  2. install angular-persona with bower:

    bower install angular-persona

  3. In your index.html, after the persona library, include the angular-persona file

In your module declaration you have to include the persona module


The configuration is very similar to Vanilla Persona:

You have to setup a login handler and a logout handler. You should do it in the run phase, in order to be able to use $http, if necessary.

In this example we suppose you store your user in a user service (it's the sensible thing to do). Remember, if the user is logged out, should be null.


To allow the user to login you should create a login button, and call Persona.request when it's clicked:


Remember to install all dependencies:

To launch tests simply run

comments powered by Disqus
This page was last updated over 4 years ago.