Commit f1753c33 authored by Grisha Kruglov's avatar Grisha Kruglov
Browse files

Part 3: Don't progress past authentication problems during account restoration

If we don't do this, we end up calling onAuthenticated _after_ callin onAuthenticationProblems.

This isn't a very principled solution, since other similar situations aren't covered.
And, we may fail 'ensureCapabilities' for reasons other than authentication (e.g. network failures).

Arguably, stopping here _is_ better than progressing with an uncertain state.
parent 8bd98b5f
......@@ -683,14 +683,13 @@ open class FxaAccountManager(
// If this is the first time ensuring our capabilities,"Ensuring device capabilities...")
if (account.deviceConstellation().ensureCapabilitiesAsync(deviceConfig.capabilities).await()) {"Successfully ensured device capabilities.")
} else {
logger.warn("Failed to ensure device capabilities.")
}"Successfully ensured device capabilities. Continuing...")
} else {
logger.warn("Failed to ensure device capabilities. Stopping.")
Event.SignedInShareableAccount -> {
// Note that we are not registering an account persistence callback here like
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment