开发者

dotnetopenauth pending request lost

开发者 https://www.devze.com 2022-12-27 18:52 出处:网络
I have dotnetopenauth working fine as a provider except when a user 开发者_运维知识库clicks the submit button multible times. Then the following error occurs:

I have dotnetopenauth working fine as a provider except when a user 开发者_运维知识库clicks the submit button multible times. Then the following error occurs:

Throw New InvalidOperationException("There's no pending authentication request!")

What is the best way to prevent this happening?


I guess you're using ProviderEndpoint.PendingAuthenticationRequest to store the request, which is automatically cleared after the response is sent. So it makes sense that an accidental double-click would result in this error. To prevent this from happening you'd have to decide how long to store a response in the user's Session and store it yourself, perhaps just before sending the first response. Then using that instead of ProviderEndpoint.PendingAuthenticationRequest.

0

精彩评论

暂无评论...
验证码 换一张
取 消