Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1658] ACS externalAccountLogin - removes capitalisation, and stores Strings all lower-case

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionDuplicate
Resolution Date2015-09-15T06:57:58.000+0000
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
LabelsTCSupportTriage, api
ReporterBrian
AssigneeShak Hossain
Created2014-08-28T23:10:14.000+0000
Updated2016-03-08T07:38:08.000+0000

Description

Problem Description

When using externalAccountLogin and supplying 'first_name', 'last_name' capitalisation is removed, and those strings stored in all lower-case. Capitalisation is preserved in fields such as 'token' and custom_fields.

TEST CODE:

app.js
 
var Cloud = require('ti.cloud');
var fb = require('facebook');
fb.appid = "FB_App_ID";
fb.permissions = ['publish_stream', 'read_stream'];
 
var win = Ti.UI.createWindow({
	title : "ACS Social Integrations"
});
 
var fbSignupBtn = Ti.UI.createButton({
	title : "Login with Facebook",
	width : 160,
	top : 50
});
win.add(fbSignupBtn);
 
fbSignupBtn.addEventListener('click', function() {
	if (!fb.loggedIn) {
		fb.authorize();
	}
});
 

fb.addEventListener('login', function(e) {
	if (e.success) {
		Cloud.SocialIntegrations.externalAccountLogin({
			type : 'facebook',
			token : fb.accessToken
		}, function(e) {
			if (e.success) {
				var user = e.users[0];
				Ti.API.info('User  = ' + JSON.stringify(user));
				Ti.App.Properties.setString('currentUserId', user.id);
				alert('Success: ' + 'id: ' + user.id + '\\n' + 'first name: ' + user.first_name + '\\n' + 'last name: ' + user.last_name);
			} else {
				alert('Error: ' + ((e.error && e.message) || JSON.stringify(e)));
			}
		});
	} else if (e.error) {
		alert("Error = " + e.error);
	} else if (e.cancelled) {
		alert("canceld");
	}
});
 
win.open();

STEPS TO TEST:

- Create a simple project. - Update app.js with test code - Add facebook and ti.cloud module - Enable cloud service - Run on android device/emulator

Actual Results

The fields lost the capitalization.

Comments

  1. Mauro Parra-Miranda 2014-09-19

  2. Brian 2014-11-18

    Mauro, Is there any update on this? I'm unable to view that status on the Cloud-ticket due to insufficient permissions. Thanks
  3. Shak Hossain 2015-09-15

    This is an existing bug and we plan to fix it in future releases.
  4. Brian 2015-09-15

    @Shak What is the existing ticket number? This ticket has been open for over a year, been assigned to multiple people, and only now being noticed as duplicate?

JSON Source