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
- Host: GitHub
- URL: https://github.com/vardius/angular-oauth2
- Owner: vardius
- License: mit
- Created: 2016-03-09T13:49:45.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-10-18T06:27:56.000Z (over 9 years ago)
- Last Synced: 2025-06-16T15:11:47.065Z (about 1 year ago)
- Language: JavaScript
- Size: 82 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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});
});
}
```