This commit is contained in:
Mo Bitar
2017-12-23 14:21:37 -06:00
parent 0c31668625
commit 93ea71672b
5 changed files with 66 additions and 14 deletions

View File

@@ -117,7 +117,7 @@ angular.module('app.frontend')
}
}
this.login = function(url, email, password, ephemeral, callback) {
this.login = function(url, email, password, ephemeral, extraParams, callback) {
this.getAuthParamsForEmail(url, email, function(authParams){
if(!authParams || !authParams.pw_cost) {
@@ -150,7 +150,7 @@ angular.module('app.frontend')
Neeto.crypto.computeEncryptionKeysForUser(_.merge({password: password}, authParams), function(keys){
var requestUrl = url + "/auth/sign_in";
var params = {password: keys.pw, email: email};
var params = _.merge({password: keys.pw, email: email}, extraParams);
httpManager.postAbsolute(requestUrl, params, function(response){
this.setEphemeral(ephemeral);
this.handleAuthResponse(response, email, url, authParams, keys);