We're currently saving the user credentials after a successful auth with identity. This diff makes it so we wait until the whole auth concludes before we save the user credentials. This allows us to simplify some code, and is more consistent with how we're handling other side effects of auth: treating the auth as a single cohesive flow, and not considering it successful unless all parts succeed.
Depends on D11765