convergencelabs / convergence-project

The project used for Convergence Project Management and Issue Reporting
https://convergence.io
42 stars 5 forks source link

Call connection credential callbacks asynchronously on each connection attempt #222

Closed mmacfadden closed 3 years ago

mmacfadden commented 3 years ago

Versions

domain.connectWithJwt("myJwt");

or

domain.connectWithJwt(() => getMyJwtReturningAPromise()));

Right now the callback is called only once on the first connect attempt. Especially for things like a JWT the connection might not succeed right away, and could actually complete many minutes from now. Thus, the callback should be called on each connection attempt, when the attempt is being made.