A simple user authentication library for AngularJS.
This library provides services and directives for AngularJS that will allow you to solve these common user management tasks in your AngularJS application:
- Register new users
- Login users
- Verify new accounts via email tokens
- Secure password reset via email tokens
- Conditionally render parts of your UI, based on login state
- Control access to application routes
Under the hood, this library uses Oauth Access Tokens (JWTs) as the authentication mechanism. This library implements the best-practice approaches that we outline in Token Based Authentication for Single Page Apps (SPAs).
If you have feedback about this library, please get in touch and share your thoughts! support@stormpath.com
Stormpath is a User Management API that reduces development time with instant-on, scalable user infrastructure. Stormpath's intuitive API and expert support make it easy for developers to authenticate, manage, and secure users and roles in any application.
Curious? Here's some screenies that show you what's included:
If you are using Bower, simply install it:
bower install --save stormpath-sdk-angularjs
If you want to manually load the minified scripts, you can grab them from the dist
folder in this repo and include them manually:
<script src="stormpath-sdk-angularjs.min.js"></script>
<script src="stormpath-sdk-angularjs.tpls.min.js"></script>
You can then require the Stormpath modules in your application:
var myApp = angular.module('myApp', ['stormpath','stormpath.templates']);
The templates are optional, see the documentation for more information.
If you are starting a new project, the Stormpath AngularJS Guide will be your best choice. It will help you get started with a new project and an API server for your application.
If you already have an Angular project, you will want to visit the Stormpath AngularJS SDK API Documenation. That documentation will show you all the available directives and services that you can use in your application.
This repository contains a working example application in the example/dashboard-app
folder.
This is the application that we build in the Stormpath AngularJS Guide.
If you would like to skip the guide and start using the example application, do the following:
-
Clone this repo
-
In your terminal, change directories to the
example/dashboard-app
folder -
Run
npm install && bower install
-
Copy the file
example/dashboard-app/server/config/local.env.sample.js
tolocal.env.js
(in the same directory) and add your Stormpath variables for the Stormpath Applicaiton that you will be using. -
Run
grunt serve
to start the example application, which will be available at http://localhost:9000
Found something you want to change? Please see the Contribution Guide, we love your input!