service.login_api(args).then(function(evt) {
if (evt.textcode == 'SUCCESS') {
- egHatch.setLoginSessionItem('eg.auth.token.oc', service.token());
- egHatch.setLoginSessionItem('eg.auth.time.oc', service.authtime());
- service.OCuser(service.user());
+ if (args.type != 'persist') {
+ egHatch.setLoginSessionItem('eg.auth.token.oc', service.token());
+ egHatch.setLoginSessionItem('eg.auth.time.oc', service.authtime());
+ service.OCuser(service.user());
+ }
service.handle_login_ok(args, evt);
service.testAuthToken().then(
deferred.resolve,
egCore.auth.opChange(args).then(
function() {
console.log('op change success');
- $scope.op_changed = true;
+ $scope.op_changed = egCore.auth.OCtoken() ? true : false;
$scope.username = egCore.auth.user().usrname();
ngToast.create(egCore.strings.OP_CHANGE_SUCCESS);
}, // note success with toast?