openid / AppAuth-JS

JavaScript client SDK for communicating with OAuth 2.0 and OpenID Connect providers.
Apache License 2.0
977 stars 162 forks source link

Allow request handler to stop listening for a response #89

Open cjgarland opened 5 years ago

cjgarland commented 5 years ago

Expected Behavior

It would be useful if there was a method on the NodeBasedHandler to stop waiting for a response / close the server if the auth redirect flow is interrupted or cancellation request is issued

Describe the problem

If a user interrupts the auth redirect flow (closing the browser or navigating away, for example) then the authorization request never completes and the server remains waiting for a response.

Actual Behavior

There is no way to close the server

Steps to reproduce the behavior

Initiate the auth redirect, then close the browser without completing the process.

Environment

tikurahul commented 5 years ago

This is a valid feature request. I will add this to my backlog. You should take a look at node_support/node_request_handler.ts to enable this on your own in the meantime.

jmaha commented 1 year ago

This bit us as well. It would be nice if there was a function call to abort an existing request as all the members that could allow us to do so are marked protected and inaccessible.