sync.authorize() can fail if remoteStorage is used as sync storage provider and the user address doesn't resolve using WebFinger. However, we close the pop-up immediately after calling sync.authorize(), so if an error occurs at this stage we cannot show it to the user any more.
I guess that authorization needs to be split into two stages, a preparation stage and actually requesting authorization from the user. We should only close the pop-up if the preparation stage succeeds. For sync storage providers other than remoteStorage the preparation stage can be a no-op, no real failure conditions there it seems.
sync.authorize()
can fail if remoteStorage is used as sync storage provider and the user address doesn't resolve using WebFinger. However, we close the pop-up immediately after callingsync.authorize()
, so if an error occurs at this stage we cannot show it to the user any more.I guess that authorization needs to be split into two stages, a preparation stage and actually requesting authorization from the user. We should only close the pop-up if the preparation stage succeeds. For sync storage providers other than remoteStorage the preparation stage can be a no-op, no real failure conditions there it seems.