You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you prefer async calls, waitInQueue(username, password) returns an (already running) QueueTimer, which polls the login queue until you are finished. QueueTimer.isFinished() tells you whether you are through the queue, QueueTimer.getPosition() returns your current position in the queue, and QueueTimer.await() blocks until you are through the queue and then returns the auth token.
QueueTimertimer = queue.waitInQueue("Username", "password");
// some other stuff comes firstStringauthToken = timer.await();
All of this boils down to use of LoginQueue.getAuthToken(username, password), which will return an AuthResult, telling you whether you are in queue or give you the auth token. If the login fails (for example due to a wrong password), a RequestException will be thrown.