+ Start a Discussion

Null userId for credentials

I just updated to the latest version of the salesforce sdk framework and i am getting a different value in the properties of the SFOauthCredentials object. I was expecting the userId of the user, but instead I am getting null values. Here's the printout of the credentials object: 


po [[[SFRestAPI sharedInstance] coordinator] credentials]

<SFOAuthCredentials identifier="(identifier value)" clientId="(client id value)" domain="test.salesforce.com/" identityUrl="(null)" instanceUrl="(null)" issuedAt="(null)" organizationId="(null)" protocol="https" redirectUri="sfdc://success">



any ideas?


Generally the creds object will not be filled-in until after authentication has completed.  

Take a look at eg the RestAPIExplorer or the app generated from the Force.com Native app Xcode template.  After oauth login completes, the cred object is completely filled-in.  The creds object you've printed out looks like it has not even been initialized with the clientId (a value that uniquely identifies the application, corresponding to the Remote Access object in your org).


Hope this helps...