Using this sample api named 'Auth.java',
last of those line :
'return new AuthorizationCodeInstalledApp(flow, localReceiver).authorize("user");'
when that .authorize("user") start to work, it opens google account select page on default brower .
if I choose my google account and following flows, it works very well.but problem occured after opening browser. if I don't choose google account or just close this page, code stopped and stay that line. so close browser and if I take course of Oauth again, erroroccurs : binding port already used(8080).
what I want is how can I take callback from server or anywhere like browser has closed so rollback this process or if authorizing process doesn't work for miinute, process roll back.