remotestorage.js
remotestorage.js copied to clipboard
GD backend automatically starts authorization proccess when the token expires
This causes the user to be unexpectedly redirected to Google Drive's authorization page. Instead it should simply return status 401 which will cause RemoteStorage.Unauthorized to be thrown.
Actually, I think this is good behaviour and we might want to discuss doing this for remoteStorage, too, and not remove it from where it already works. Fargo.io does this as well for example, and it's a very nice experience not having to worry about it as a user, but just accepting the dialog whenever the app needs access.
@Ragnis What do you think, should we still change this to throw unauthorized?
Also linking #735 as this would then have to use the new event instead of throwing an error.
@Ragnis What do you think?
I think it should emit the event mentioned in #735 so that the situation can be handled as appropriate.