简体   繁体   中英

dotnetopenauth pending request lost

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM