Closed yocontra closed 11 years ago
@Contra Thank you for your concern. Actually that's what I tried to do.
I've used this library at server-side, that means a lot of users can access this library concurrently. At that time, if we try to re-use a session then the conflict can be occurred because of node.js' event driven architecture.
To avoid this conflict, I had to implement some data structures like a session map so I decided to skip optimizing to maintain its simplicity.
Anyway this is what I experienced. But if you have any other awesome ideas then please let me know. Surely always welcome your pull requests.
Would help this be more modular. Your tokens expire after a certain point so re-running only the needed part to refresh it would be easier than doing the whole process