Skip to content

Commit

Permalink
v0.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
sahat committed Sep 3, 2014
1 parent c80fefd commit a072db6
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![Build Status](http://img.shields.io/travis/sahat/satellizer.svg?style=flat)](https://travis-ci.org/sahat/satellizer)
[![Code Climate](http://img.shields.io/codeclimate/github/sahat/satellizer.svg?style=flat)](https://codeclimate.com/github/sahat/satellizer)
[![Test Coverage](http://img.shields.io/codeclimate/coverage/github/sahat/satellizer.svg?style=flat)](https://codeclimate.com/github/sahat/satellizer)
[![Version](http://img.shields.io/badge/version-0.6.0-orange.svg?style=flat)](https://www.npmjs.org/package/satellizer)
[![Version](http://img.shields.io/badge/version-0.6.1-orange.svg?style=flat)](https://www.npmjs.org/package/satellizer)

**:space_invader: Live Demo:** [https://satellizer.herokuapp.com](https://satellizer.herokuapp.com)

Expand Down Expand Up @@ -45,7 +45,7 @@ npm install satellizer --save
or use the CDN:

```html
<script src="//cdn.jsdelivr.net/satellizer/0.6.0/satellizer.min.js"></script>
<script src="//cdn.jsdelivr.net/satellizer/0.6.1/satellizer.min.js"></script>
```

## Usage
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "satellizer",
"version": "0.6.0",
"version": "0.6.1",
"main": "satellizer.js",
"homepage": "https://github.com/sahat/satellizer",
"ignore": [
Expand Down
15 changes: 12 additions & 3 deletions examples/client/vendor/satellizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
logoutRedirect: '/',
loginRedirect: '/',
signupRedirect: '/login',
loginOnSignup: true,
loginUrl: '/auth/login',
signupUrl: '/auth/signup',
loginRoute: '/login',
Expand Down Expand Up @@ -85,6 +86,10 @@
get: function() { return config.signupRedirect; },
set: function(value) { config.signupRedirect = value; }
},
loginOnSignup: {
get: function() { return config.loginOnSignup; },
set: function(value) { config.loginOnSignup = value; }
},
loginUrl: {
get: function() { return config.loginUrl; },
set: function(value) { config.loginUrl = value; }
Expand Down Expand Up @@ -274,9 +279,13 @@
var deferred = $q.defer();

$http.post(config.signupUrl, user)
.then(function() {
$location.path(config.signupRedirect);
deferred.resolve();
.then(function(response) {
if (config.loginOnSignup) {
shared.parseUser(response, deferred);
} else {
$location.path(config.signupRedirect);
deferred.resolve(response);
}
})
.catch(function(response) {
deferred.reject(response);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "satellizer",
"description": "Token-based AngularJS Authentication",
"version": "0.6.0",
"version": "0.6.1",
"scripts": {
"start": "node ./examples/server/node/server.js",
"test": "karma start"
Expand Down

0 comments on commit a072db6

Please sign in to comment.