Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unable to connect to salesforce.

ANSWERED

I have created a App in fitbitdev and i want to use Authorization Code Flow functionality to Salesforce application.

As user when i complete my oauth and redirect back to salesforce i am getting following error.

I have added the callback url provided by the salesforce during the creation of Auth. Provider but

I am getting following error.

https://feitbittest-dev-ed.my.salesforce.com/_nc_external/identity/sso/ui/AuthorizationError?ErrorCo...

 

also the Authorization code is not received.

 

and  when i try with the Implicit Grant Flow I am able to get the OAuth 2.0 Access Token as a return but still the error "No_Oauth_State: State was not sent back" exists.

.

 

Please let me know how can this issue be solved.

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

Hi @priyesh 

 

I've tried researching this error for you, and I'm not finding an exact solution.   The error is generated by Salesforce.  Based on the error text, it appears Salesforce is expecting a value for the state parameter and this value was not provided during authorization. 

 

You can supply the state parameter within the authorization endpoint.  We recommend you use the state parameter, but Fitbit doesn't require it.   It's possible Salesforce is requiring the state parameter during authorization as an added measure of security.   I would assume somewhere in the Salesforce configuration, a state value is defined.  Here's the Fitbit documentation on the state parameter: https://dev.fitbit.com/build/reference/web-api/oauth2/#authorization-page.    

 

I found some web pages where people have found solutions to various state issues.   Maybe one of these solutions can direct you to a solution

https://salesforce.stackexchange.com/questions/224231/salesforce-no-oauth-state-state-not-valid

https://salesforce.stackexchange.com/questions/204637/how-does-salesforce-handle-or-use-the-state-pa...

https://developer.salesforce.com/forums/?id=9060G000000I3ohQAC

 

 

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google

View best answer in original post

Best Answer
0 Votes
5 REPLIES 5

Hi @priyesh,

 

Welcome to the forums!

 

So that I can take a look, can you please PM me your Client ID?

 

Hope to hear from you soon!

Best Answer
0 Votes

Hi @JohnFitbit ,

 

Please find my Client Id :22B9NJ

please let me know in case if you need any further details.

 

Thanks and Regards,

Priyesh 

Best Answer
0 Votes

Hi @priyesh 

 

I've tried researching this error for you, and I'm not finding an exact solution.   The error is generated by Salesforce.  Based on the error text, it appears Salesforce is expecting a value for the state parameter and this value was not provided during authorization. 

 

You can supply the state parameter within the authorization endpoint.  We recommend you use the state parameter, but Fitbit doesn't require it.   It's possible Salesforce is requiring the state parameter during authorization as an added measure of security.   I would assume somewhere in the Salesforce configuration, a state value is defined.  Here's the Fitbit documentation on the state parameter: https://dev.fitbit.com/build/reference/web-api/oauth2/#authorization-page.    

 

I found some web pages where people have found solutions to various state issues.   Maybe one of these solutions can direct you to a solution

https://salesforce.stackexchange.com/questions/224231/salesforce-no-oauth-state-state-not-valid

https://salesforce.stackexchange.com/questions/204637/how-does-salesforce-handle-or-use-the-state-pa...

https://developer.salesforce.com/forums/?id=9060G000000I3ohQAC

 

 

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes

I suppose this erraor may be generated by your salesforce.Probably you should contact your salesforce customization services  and ask for help some professional

Best Answer
0 Votes

I agree there are no universal tips that would work for every business. When I opened a local sales platform I was discouraged by my pals who didn't believe in my success but they were wrong. The most important thing for me was to find a nice small team and cool software. For example, I've tried the salesforce inbox  to manage my salesforce data and create a proper schedule. It helped me a lot, but without my core team, success wouldn't be possible.

Best Answer
0 Votes