china-live / QQConnect

asp.net core2.0 QQ和微信登录
BSD 3-Clause "New" or "Revised" License
282 stars 78 forks source link

state过长 #2

Open beardidi opened 6 years ago

beardidi commented 6 years ago

配置了微信登录,但出现state过长的错误,请问是怎么回事?谢谢

china-live commented 6 years ago

没遇到过呢,能提供一下具体的错误详情么?

beardidi commented 6 years ago

好像是property编码后过长造成的。代码是: 调用: var redirectUrl = Url.Page("./ExternalLogin", pageHandler: "Callback", values: new { returnUrl }); var properties = _signInManager.ConfigureExternalAuthenticationProperties(provider, redirectUrl); return new ChallengeResult(provider, properties);

state的值是: CfDJ8HT-XUxwX39NliIYvuVEwPsX0pZHwbJnvR5pmAS-3yVHDyKM63iXwLQuuuSRTMFWbPR--WZd2nbV3G-IrrxGXRy0eZfijNFK6VJUbXKWwoLO4mCsIQvZagDJiRy1JNTenjKTvwXnmeJUx_Nh3eOem0dUBBiTvblvq-1O-smkt29o9Padw0zcdyGPIv9_BoXtbSCSAhVNY5viYQnunBr8a8-RaUhE481qOmgJb_rXmkJYX7R2i9Bd9n98D3v3wJv77u5SH_0U_dIPgSLfPNdrInAaNMeIFLGTAdSs8UnwycOk