Open Gikkman opened 8 years ago
I've found that this problem stems from row 78 in AuthenticationCallbackServer.java
. When the .accept()
request never sees an incoming connection, it will block indefinitely. In case the ClientID is incorrect, an incoming connection will never occur.
An easy solution would be to add a timeout to the server socket, say about 1-2 minutes. If the user did make a choice within that time, we can assume he will not make on at all.
If you supply a
ClientID
which doesn't map to a validClientID
, or if yourRedirectURI
does not match the registeredRedirectURI
, it seems like the .awaitAccessToken()
command never returns.I've tried a lot of different techniques for hacking my way around it but I cannot seem to understand the underlying Authorization process. Is it possible to either A) interrupt the
awaitAccessToken()
(and make it release its resources) or B) make it detect that theClientID
is not valid?