You need to sign in to do that
Don't have an account?
Brahim Hadi
Linkedin Auth Provider error
Hi Experts,
I followed all the instructions on how to create a LinkedIn authentication with OAuth 2.0 (https://developer.linkedin.com/docs/oauth2), but still I couldn't get it working.
I am getting this error when I try to login to my user community via LinkedIn login:
"We can’t log you in because of the following error. For more information, contact your Salesforce administrator.
No_Oauth_State: State was not valid"
Test-Only Initialization URL works fine.
Do you have any idea what could be wrong in my configuration?
Best regards,
Huda
Here are my settings:
I followed all the instructions on how to create a LinkedIn authentication with OAuth 2.0 (https://developer.linkedin.com/docs/oauth2), but still I couldn't get it working.
I am getting this error when I try to login to my user community via LinkedIn login:
"We can’t log you in because of the following error. For more information, contact your Salesforce administrator.
No_Oauth_State: State was not valid"
Test-Only Initialization URL works fine.
Do you have any idea what could be wrong in my configuration?
Best regards,
Huda
Here are my settings:
All Answers
Now I am getting a new error which says:
"We can’t log you in because of the following error.
REGISTRATION_HANDLER_ERROR: List has no rows for assignment to SObject"
I am getting this error from the Salesforce itself.
I am using this Registration Handler class which I haven't modify anything to it: https://github.com/salesforceidentity/social-signon-reghandler/blob/master/SocialRegHandler.cls
Could you please help to check what is the issue here?
Thank you in advance,
Huda
The issue is now solved and everything is working as expected :-).
I modified the Registration Handler class so that it will just check if the user exists in salesforce or not:
- If the LinkedIn user is found in the Salesforce DB he can login to the user community.
- If the LinkedIn user is not found in the Salesforce DB he cannot login the user community and a proper message will be displayed.
Here is the whole class: Now I need to write a unit test for it. So, could you please help me?
Best regards,
Huda
Thanks for posting your code, it works great for me for Google Social Sign On. Would you be able to post the test classes you wrote for this code?
Best regards,
Rick