An open API service indexing awesome lists of open source software.

https://github.com/vardius/angular-oauth2

Angular oauth2 provider
https://github.com/vardius/angular-oauth2

Last synced: 9 months ago
JSON representation

Angular oauth2 provider

Awesome Lists containing this project

README

          

angular-voauth2
==================

Angular oauth2 provider

## Installation

Install with bower:

```bash
$ bower install angular-voauth2 --save
```

Install with npm:

```bash
$ npm install angular-voauth2
```

Load the `angular-voauth2` module in your app.

```javascript
angular.module('app', ['vOAuth2']);
```

## Catch oauth errors

Remember to remove token

```javascript
angular.module('myApp', ['vOAuth2'])
.run(run);

run.$inject = ['$rootScope', '$state'];

function run($rootScope, $state) {
$rootScope.$on('voauth:error', function () {
$state.go('login', {}, {reload: true});
});
}
```