cpprestsdk
cpprestsdk copied to clipboard
Oauth1Client. How to detect browser close event ?
Hi, I have tried many methods to detect browser close events. But, Unfortunately, I have not been able to detect the close.

I used this example here for google/facebook login: https://github.com/microsoft/cpprestsdk/blob/master/Release/samples/Oauth1Client/Oauth1Client.cpp
And I added this callback as below, but the result always returns "Completed" :

Could somebody give me some solution for this problem?
_listener = new http_listener(url);
_listener->support([this](http::http_request request) {
//my code
request.reply(web::http::status_codes::OK, json::value::string(U("Login success. Please close website!"))).then([this](pplx::task<void> result) {
//my code
});
});
_listener->open().then([this](pplx::task<void> result) {
//my code
}).wait();