AppAuth-JS icon indicating copy to clipboard operation
AppAuth-JS copied to clipboard

Allow request handler to stop listening for a response

Open cjgarland opened this issue 6 years ago • 2 comments

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

  • AppAuth-JS version: 0.3.5
  • AppAuth-JS Environment (Node, Browser (UserAgent), ...): Node

cjgarland avatar Oct 29 '18 16:10 cjgarland

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.

tikurahul avatar Oct 29 '18 19:10 tikurahul

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.

jmaha avatar Jun 15 '23 21:06 jmaha