Currently, an AccountService is the only authority to notify the global Account object of updated AccountDetails. An external storage provider is queried automatically (see AccountStorageStandard/load(::) by SpeziAccount on such occasions to build the complete AccountDetails object.
1. Account Service calls `Account/supplyUserDetails(_:isNewUser:)` with `details`.
2. Account services calls `AccountStorageStandard/load(_:_:)` to query additional account details stored externally.
3. The `Account/details` property is updated with all user information.
The current problem is, that an AccountStorageStandard cannot update the account details itself. It has to wait till the current AccountService may choose to call supplyUserDetails(_:isNewUser:).
Solution
To resolve this issue, we might want to add functionality, to allow an AccountStorageStandard to arbitrarily update account details (e.g., when a database record is manually or externally changed) such that Account always reflects the latest state.
Additional context
No response
Code of Conduct
[X] I agree to follow this project's Code of Conduct and Contributing Guidelines
Problem
Currently, an
AccountService
is the only authority to notify the globalAccount
object of updatedAccountDetails
. An external storage provider is queried automatically (see AccountStorageStandard/load(::) by SpeziAccount on such occasions to build the completeAccountDetails
object.Below is an illustration of the general flow when a call to Account/supplyUserDetails(_:isNewUser:) is done by the current
AccountService
:The current problem is, that an
AccountStorageStandard
cannot update the account details itself. It has to wait till the current AccountService may choose to callsupplyUserDetails(_:isNewUser:)
.Solution
To resolve this issue, we might want to add functionality, to allow an
AccountStorageStandard
to arbitrarily update account details (e.g., when a database record is manually or externally changed) such thatAccount
always reflects the latest state.Additional context
No response
Code of Conduct