From a072db6c0d617cdb80fd1e718e15f13608ddfbcd Mon Sep 17 00:00:00 2001 From: Sahat Yalkabov Date: Tue, 2 Sep 2014 22:46:02 -0700 Subject: [PATCH] v0.6.1 --- README.md | 4 ++-- bower.json | 2 +- examples/client/vendor/satellizer.js | 15 ++++++++++++--- package.json | 2 +- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 46c63cb7..ac71878e 100644 --- a/README.md +++ b/README.md @@ -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) @@ -45,7 +45,7 @@ npm install satellizer --save or use the CDN: ```html - + ``` ## Usage diff --git a/bower.json b/bower.json index 6f415723..d6054ae5 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "satellizer", - "version": "0.6.0", + "version": "0.6.1", "main": "satellizer.js", "homepage": "https://github.com/sahat/satellizer", "ignore": [ diff --git a/examples/client/vendor/satellizer.js b/examples/client/vendor/satellizer.js index e27aeab5..123bc557 100644 --- a/examples/client/vendor/satellizer.js +++ b/examples/client/vendor/satellizer.js @@ -12,6 +12,7 @@ logoutRedirect: '/', loginRedirect: '/', signupRedirect: '/login', + loginOnSignup: true, loginUrl: '/auth/login', signupUrl: '/auth/signup', loginRoute: '/login', @@ -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; } @@ -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); diff --git a/package.json b/package.json index 8410c19d..4750aa17 100644 --- a/package.json +++ b/package.json @@ -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"