• cwagner
  • NEWBIE
  • 0 Points
  • Member since 2011

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 4
    Replies

Currently we are not using OAuth with our apps but we are working on making the shift, we have direct login and capture the user/pass that was entered and store those. We then turn around and use this for a feature that allows the user to open a record within Salesforce.com, we pass the user/pass in to the login endpoint along with a starting URL to the specific record, this works great and is a well liked feature as it is a simple SSO from the App to Salesforce.com where the user can see all data that may not be visible within the app.

 

Moving to OAuth 2.0 and using the standard webflow, we no longer can capture the user/pass, which is actually a good thing as far as security is concerned. We would however like to keep this functionality, is there anyway of SSO'ing into Salesforce.com by passing along one of the OAuth tokens or some kind of sesson id?

I am attempting to download Attachments/Documents in an iOS app using ASIHTTPRequest and found that the REST operation outlined in http://www.salesforce.com/us/developer/docs/api_rest/Content/dome_sobject_blob_retrieve.htm does not return Content-Length in its headers. Is there anyway I can force Content-Length to be returned in the response header? I know I can use BodyLength to get it, but I would like to reduce the need to query for the length before queuing up the download.  Content-Length is desired to properly implement a progress indicator of the download.

Hi,

 

We have a native iOS mobile application that uses the Salesforce mobile sdk -- specifically to use OAuth 2.0 authentication (user-agent) and the REST API to manipulate salesforce objects.  We have no Apex or other code that needs to be hosted on salesforce.com.  This application will be used by different companies (i.e., it is not an internal application).

 

My understanding is that in order to get the consumer key required for use by OAuth, we need to create a managed Package for AppXChange and define our appication as a "Remote Access Application".  Per Salesforce packaging guide "Designing Packages for Remote Access Using OAuth". Since this application will be used by many different customers, my understanding is to get a single consumer key for my iOS app, I need to create this managed package that customers will then install on their salesforce orgs to allow my app to talk to their org.

 

The question is, what is the best practice for what else needs to be added to this package?  If I only define the remote access application, I cannot upload the package.  However, I don't think it's correct to create some random custom object that I'll never use.  

 

I have not been able to find any directions on enabling a "native client only" application to get the consumer key and would appreciate any pointers to more information.

 

Thanks,

 

derick

For an existing iPhone application which used old-school logins (i.e. required a token and stored user creds) I added OAuth support last week using code from the Mobile SDK preview.

 

It's been working perfectly until today, when I've had errors several times regarding failed JSON parsing when processing the response of a refresh request (see below). What's odd is that the JSON is perfectly valid according to jsonlint.com so I'm assuming there's a problem with the parsing that's happening in SFOAuthCoordinator. Anybody have any ideas of how to resolve this? It's preventing my from continuing with my development! (I know the SDK is a preview release but surely login shouldn't need to change?).

 

oauthCoordinator:didFailWithError: Error Domain=SFOAuthErrorDomain Code=668 "SFOAuthErrorDomain malformed_response : failed to parse response JSON" UserInfo=0x760d700 {error=malformed_response, NSLocalizedDescription=SFOAuthErrorDomain malformed_response : failed to parse response JSON, error_description=failed to parse response JSON, response_data={"id":"https://test.salesforce.com/id/00DO00000005SlNMAU/00590000000NZvLAAW","issued_at":"1320726727749","instance_url":"https://cs5.salesforce.com","signature":"bapfKpkvacGgWSEddD+buphb2W3Y2Rwaq40FBIrbERE=","access_token":"00DO00000005SlN!AR8AQLQofWLSElsO0xcyc4bnIdMe.vmoFz_Ua237NMtdEWO6KMgZW2rdNTEKsERFy3Df2Lxe1Cmh.QcWJ2jDHAtVaReXjDZI"}, NSUnderlyingError=0x760aa60 "SFOAuthErrorDomain malformed_response : failed to parse response JSON"}