Hi there,
This is less of a feature request or bug, but more of question.
I observed that when the refresh is being called during a network outage (or airplane mode) clearLogin() is called, due to the network error.
This in effect causes the ASWebAuthenticationSession sheet to re-appear (i think).
Well, what I was wondering how best to handle these situations with OAuthenticator, if already possible.
I suppose I could check inside my storeLogin if the login to be stored is invalid and then simply decide not to store it?
But this feels like an antipattern somehow, because at that point I cannot reason about the cause of the invalid login. Is there a better way to discard certain errors and not handle them as invalid logins, so that future calls/retries to the refresh can be succesful, without the user having to manually log-in again?
Another way would be to simply not do any network calls in such situations in the first place of course, which is what I am currently considering. But in my opinion it could be useful to treat specific errors as recoverable/retrieable in terms of refresh.
thanks :)
Hi there,
This is less of a feature request or bug, but more of question.
I observed that when the refresh is being called during a network outage (or airplane mode)
clearLogin()is called, due to the network error.This in effect causes the ASWebAuthenticationSession sheet to re-appear (i think).
Well, what I was wondering how best to handle these situations with OAuthenticator, if already possible.
I suppose I could check inside my
storeLoginif the login to be stored isinvalidand then simply decide not to store it?But this feels like an antipattern somehow, because at that point I cannot reason about the cause of the invalid login. Is there a better way to discard certain errors and not handle them as invalid logins, so that future calls/retries to the refresh can be succesful, without the user having to manually log-in again?
Another way would be to simply not do any network calls in such situations in the first place of course, which is what I am currently considering. But in my opinion it could be useful to treat specific errors as recoverable/retrieable in terms of refresh.
thanks :)