{ "id": "108569", "key": "AC-1746", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "5", "description": "All attempts at reproducing this issue failed, or not enough information was available to reproduce the issue. Reading the code produces no clues as to why this behavior would occur. If more information appears later, please reopen the issue.", "name": "Cannot Reproduce" }, "resolutiondate": "2014-01-05T23:39:37.000+0000", "created": "2013-01-25T18:28:28.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2016-03-08T07:40:38.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "14544", "name": "Alloy", "description": "Please enter tickets related to the Alloy here." }, { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "h3. Steps to Reproduce\r\nLog in user with external account to ACS. This doesnt seem to happen with every user. I have tried with 2 accounts, my personal account logs in, creates new ACS user fine, logs out. The other is inconsistent. It will login and create a user the first time but it will not allow me to update that ACS user. Logout is fine but on the next external login I will get the error: Email is already taken.\r\n\r\nh3. Actual Result\r\nError: Email is already taken.\r\n\r\nh3. Expected Result\r\nSuccess", "attachment": [], "flagged": false, "summary": "Error: 'Email is already taken' on ACS Facebook login", "creator": { "name": "creativejunky", "key": "creativejunky", "displayName": "Daniel Mahon", "active": true, "timeZone": "America/New_York" }, "subtasks": [], "reporter": { "name": "creativejunky", "key": "creativejunky", "displayName": "Daniel Mahon", "active": true, "timeZone": "America/New_York" }, "environment": "Titanium Studio 3.0.2", "comment": { "comments": [ { "id": "236086", "author": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Please provide a code sample of what you are doing and I will research.", "updateAuthor": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-01-26T01:21:25.000+0000", "updated": "2013-01-26T01:21:25.000+0000" }, { "id": "236498", "author": { "name": "creativejunky", "key": "creativejunky", "displayName": "Daniel Mahon", "active": true, "timeZone": "America/New_York" }, "body": "Code Sample: https://gist.github.com/4667734\n\nNotes:\nIf I remove the email from the update call it works, the account logs in and updates correctly but if I make a call to ACS after the login, the user record doesnt seem to exist. I see and can query only 2 of 3 created accounts. I have now tested on 3 facebook accounts 2 of which work 1 still does not. It is acting almost as if there is a corrupt record in ACS for that specific user.", "updateAuthor": { "name": "creativejunky", "key": "creativejunky", "displayName": "Daniel Mahon", "active": true, "timeZone": "America/New_York" }, "created": "2013-01-29T21:01:54.000+0000", "updated": "2013-01-29T21:01:54.000+0000" }, { "id": "237690", "author": { "name": "creativejunky", "key": "creativejunky", "displayName": "Daniel Mahon", "active": true, "timeZone": "America/New_York" }, "body": "Please reopen as I have provided the code sample.\n\nAlso, I notice that the user I try to login is prompted with the \"Save this device\" dialog through facebook on EVERY login. I also noticed that the ACS USER ID is different upon sequential logins. It is still acting as if the initial login is NEVER getting persisted to ACS and therefore generating new ids on each attempt, however it still gives the \"Email is already taken\" error. I am at the end of the rope on this one. I was hoping to use ACS for my user profiles and migrate away from my own DB. I just need to know if its something I'm doing on my end or a problem with ACS. If it has to do with some facebook settings that is a deal breaker as well because I cant assume to know my users FB settings.\n\nI would appreciate ANY direction you could give. Thanks!", "updateAuthor": { "name": "creativejunky", "key": "creativejunky", "displayName": "Daniel Mahon", "active": true, "timeZone": "America/New_York" }, "created": "2013-02-07T22:50:23.000+0000", "updated": "2013-02-07T22:50:23.000+0000" }, { "id": "237726", "author": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "body": "When you use Social Intergration to login to Facebook, it auto creates an account in ACS with the Facebook email and the users first and last name from facebook. It gives that user a unique ID, and then you are logged in. There is no need to try and update the user with the Facebook details. I believe this is why you are getting the error that the email is already taken. Have you looked in your ACS control panel for the app to see if the user exists with the proper email?", "updateAuthor": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-02-08T03:24:24.000+0000", "updated": "2013-02-08T03:24:24.000+0000" }, { "id": "237773", "author": { "name": "creativejunky", "key": "creativejunky", "displayName": "Daniel Mahon", "active": true, "timeZone": "America/New_York" }, "body": "The ACS control panel (and API calls) never show that user and it does not add the email from facebook. Though the update callback returns the proper user with custom_fields and anything else I added. Never persists in ACS though. Side note: there is a bug with the ACS panel that shows incorrect record count (ie: 7 results was found, when there are only 2 records), refreshing a couple times solves it.", "updateAuthor": { "name": "creativejunky", "key": "creativejunky", "displayName": "Daniel Mahon", "active": true, "timeZone": "America/New_York" }, "created": "2013-02-08T19:24:02.000+0000", "updated": "2013-02-08T19:24:02.000+0000" }, { "id": "237795", "author": { "name": "creativejunky", "key": "creativejunky", "displayName": "Daniel Mahon", "active": true, "timeZone": "America/New_York" }, "body": "I created FB test users and played with multiple security settings, they all login and persist in ACS just fine. Cannot figure out why this specific user cannot be created in ACS... \r\n\r\nFYI: Not getting the \"Email is already taken\" error anymore though, since I am not trying to update the profiles email after login.", "updateAuthor": { "name": "creativejunky", "key": "creativejunky", "displayName": "Daniel Mahon", "active": true, "timeZone": "America/New_York" }, "created": "2013-02-08T20:26:41.000+0000", "updated": "2013-02-08T20:31:17.000+0000" }, { "id": "237835", "author": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "body": "So is this still an issue for you?", "updateAuthor": { "name": "aleard", "key": "aleard", "displayName": "Alan Leard", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-02-08T22:21:24.000+0000", "updated": "2013-02-08T22:21:24.000+0000" }, { "id": "237839", "author": { "name": "creativejunky", "key": "creativejunky", "displayName": "Daniel Mahon", "active": true, "timeZone": "America/New_York" }, "body": "Sorry if that was confusing but YES, this is still an issue for me because I have found it basically impossible to save that user into ACS. It worries me because I don't want to run into the same problem in production without knowing the cause. Also I would LIKE to put the email back into the login/update request as to save as much info as I can from the FB details.", "updateAuthor": { "name": "creativejunky", "key": "creativejunky", "displayName": "Daniel Mahon", "active": true, "timeZone": "America/New_York" }, "created": "2013-02-08T22:31:57.000+0000", "updated": "2013-02-08T22:31:57.000+0000" }, { "id": "283113", "author": { "name": "mrahman", "key": "mrahman", "displayName": "Mostafizur Rahman", "active": true, "timeZone": "Asia/Dhaka" }, "body": "We tried to reproduce this issue with Titanium SDK 3.1.3GA and were not able to reproduce it. Please test this issue using the latest release and let us know if the issue persists.\r\n\r\nh5. Test Environment: \r\n\r\nOS: MAC OS X 10.8.5\r\nTi SDK: 3.1.3 GA, 3.2.0.x\r\nTi CLI: 3.3.0\r\nIOS simulator 7.0\r\nCloud Module 3.2.0\r\nFacebook Module 3.1.1\r\n\r\n\r\nh5. Test Code\r\n{code}\r\nvar win = Titanium.UI.createWindow({\r\n\tbackgroundColor : '#ccc'\r\n});\r\nvar Cloud = require('ti.cloud');\r\n// Cloud.debug = true;\r\nvar fb = require('facebook');\r\nfb.appid = XXXXXXXXXXXXXXX;\r\nfb.permissions = ['publish_stream'];\r\nfb.addEventListener('login', function(login) {\r\n\tif (login.success) {\r\n\r\n\t\tfbDetails = login.data;\r\n\t\tTi.API.info('login.success ' + JSON.stringify(fbDetails.email));\r\n\r\n\t\tCloud.SocialIntegrations.externalAccountLogin({\r\n\t\t\ttype : 'facebook',\r\n\t\t\ttoken : fb.accessToken\r\n\r\n\t\t}, function(e) {\r\n\t\t\tif (e.success) {\r\n\r\n\t\t\t\tvar user = e.users[0];\r\n\t\t\t\tcurrentUser = e.users[0];\r\n\t\t\t\tloggedIn = true;\r\n\r\n\t\t\t\tCloud.Users.update({\r\n\t\t\t\t\temail : fbDetails.email,\r\n\t\t\t\t\tfirst_name : fbDetails.first_name,\r\n\t\t\t\t\tlast_name : fbDetails.last_name,\r\n\t\t\t\t\tcustom_fields : {\r\n\t\t\t\t\t\tfacebook : fbDetails\r\n\t\t\t\t\t}\r\n\t\t\t\t}, function(e) {\r\n\t\t\t\t\talert(' Success: ' + JSON.stringify(e. success));\r\n\r\n\t\t\t\t});\r\n \r\n\t\t\t} else {\r\n\t\t\t\talert('Error: ' + ((e.error && e.message) || JSON.stringify(e)));\r\n\t\t\t}\r\n\t\t});\r\n\r\n\t}\r\n});\r\nfb.addEventListener('logout', function(e) {\r\n\talert('Logged out');\r\n});\r\n\r\nwin.add(fb.createLoginButton({\r\n\ttop : 50,\r\n\tstyle : fb.BUTTON_STYLE_WIDE\r\n}));\r\n\r\nwin.open();\r\n\r\n{code}\r\n\r\n\r\n\r\nh5. Step to reproduces\r\n# Create a new project\r\n# Activate ACS cloud and Facebook module\r\n# Paste test code in app.js\r\n# Now run on iOS simulator \r\n# Click on Facebook login button\r\n# Success alert will display after FB login complete \r\n\r\n\r\n\r\nh5. Test Result\r\n\r\nUser email, first_name, last_name and custom_object update will successfully completed.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-12-08T13:34:29.000+0000", "updated": "2013-12-17T21:19:17.000+0000" }, { "id": "286071", "author": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing since a functional test sample has been posted. This is invalid with the latest version of the SDK & ACS.", "updateAuthor": { "name": "shossain", "key": "shossain", "displayName": "Shak Hossain", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-12-28T07:04:29.000+0000", "updated": "2013-12-28T07:04:29.000+0000" }, { "id": "286688", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~creativejunky] Please let us know if you can still reproduce the issue and we would be happy to reopen the ticket and investigate it for you.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-05T23:39:21.000+0000", "updated": "2014-01-05T23:39:21.000+0000" } ], "maxResults": 12, "total": 12, "startAt": 0 } } }