Skip to main content
In my Org, I have implemented OAuth 2.0 SSO between Salesforce and InWeChat (the mobile version of WeChat login).

 

We have a Login visual force page on our site and the user can log in via Salesforce Identity or via WeChat Social Login.

 

For that, we have configured a custom Auth Provider for WeChat.

 

Everything works correctly for WeChat desktop social login but in the mobile version of WeChat social login we get an error message : "State is too long". Actually WeChat Social Login for mobile can accept a state with 128 characters length. And the state provided by Salesforce is much longer...

 

So my question is the following : is it possible to customize the state that is generated by Salesforce and therefore reduce its length ? Otherwise, it will not be possible for us to login via WeChat mobile when we come from Salesforce.

 

Thank you for feedback!  

 

NB : Example of returnUrl in OAuth flow:

 

https://open.weixin.qq.com/connect/oauth2/explorer_authorize?appid=wx42d5174eefc29f1f&redirect_uri=https%3A%2F%2Faccount-prp.louisvuitton.cn%2Fservices%2Fauthcallback%2FWeChat_Mobile&response_type=code&scope=snsapi_userinfo&state=CAAAAW8TMB_7ME8wNTUwMDAwMDA0Qzk3AAAA3pX-i8fDN0IRR2xPfMhwLmORZoZWglY3Y10vzbETDcAwYuhH5UDaiUd56zaPgAfjE8wQudeoclwJ_BkBrayTNM5wdrQ4aWfJuqzDQO6sFcCpCpprFqQr0KIvuVH3ErH2y96DMlsc4aaVuAk9o0qEU7pYB-aQvxUVf5ufGQor8EoLL6qkxS9H_91SlAw2QUW8a6rYs85jSpn8TMewzjkGcheMTqdJo7XcKRYPG8I6gsQwgmxWul0IU2EQck5ByeTiTzIWUuVPutOcLut1Lhj26c8vKLGSPtZzTQrTTcETGq5lt7roysIZjnjgqROQXyKlAbILgWdn9LyMlranPkEHisZsL3nULeFgmnsjrUGwnvz8s0IvLzADmUUIN9Z7mBbnjDBTYaqHzuzL2QVMborr2q2vQXlY4AfS0Z8P_RKzGuWjFksqgQFWX1zKTqsiATwGKtdBIDEXOz3KgnJnKAu77B8gTV59ubYpJBwur9ML_XH_BXA2yCU0TQKEgI9H95WaXDtvrfzk2OLla8rEE78YrSvTh7elC2Vo_d_QuA_FKG0lDxG6Vbm5YYrodkgFSic4LzdQITkeW8VXjFty6xA4S6o%3D&ua=safari&ts=1576574019&nonce=t9zFrvWLAiAIoCGr&oauth_sig=eb388d8683900de3b6a6ef63e8ece789b053a9d3&from_safari=1#.wechat_redirect 
2 respostas
0/9000