Accounts.oauth.tryLoginAfterPopupClosed does not retrieve errors from pendingCrendentials

Hey :wave: ,
I’m not quite sure this oauth login behaviour is intended.

Should it not rather be something like:

if (!credentialSecret && shouldRetry) {

This would to retrieve an error after the retry, if there was one, instead of simply closing the modal without any effect. This sounds more like the intended behaviour considering all the error handling code on the server to make this possible. Are there reasons not to do so?

I’m also a little curious why this rather complex way of handling an error is even necessary. Why is the error stored in the db, instead of adding it to the config that is passed down via html to the client. If the secret can be passed down and handled like this, why not an error?