{"action":"created","issue":{"url":"https://api.github.com/repos/remotestorage/remotestorage.js/issues/866","labels_url":"https://api.github.com/repos/remotestorage/remotestorage.js/issues/866/labels{/name}","comments_url":"https://api.github.com/repos/remotestorage/remotestorage.js/issues/866/comments","events_url":"https://api.github.com/repos/remotestorage/remotestorage.js/issues/866/events","html_url":"https://github.com/remotestorage/remotestorage.js/issues/866","id":80316567,"number":866,"title":"Disconnecting without clearing local data?","user":{"login":"lewisl9029","id":6934200,"avatar_url":"https://avatars.githubusercontent.com/u/6934200?v=3","gravatar_id":"","url":"https://api.github.com/users/lewisl9029","html_url":"https://github.com/lewisl9029","followers_url":"https://api.github.com/users/lewisl9029/followers","following_url":"https://api.github.com/users/lewisl9029/following{/other_user}","gists_url":"https://api.github.com/users/lewisl9029/gists{/gist_id}","starred_url":"https://api.github.com/users/lewisl9029/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lewisl9029/subscriptions","organizations_url":"https://api.github.com/users/lewisl9029/orgs","repos_url":"https://api.github.com/users/lewisl9029/repos","events_url":"https://api.github.com/users/lewisl9029/events{/privacy}","received_events_url":"https://api.github.com/users/lewisl9029/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-25T00:20:05Z","updated_at":"2015-05-26T13:44:32Z","closed_at":null,"body":"Disconnecting remotestorage right now seems to clear everything(?) in IndexedDB by default.\r\n\r\nIs it possible to bypass this side-effect and just disconnect a remotestorage account without clearing IndexedDB? For apps that create local modules for offline use and then optionally allow the user to connect a remotestorage account to selectively sync all or none of them, this behavior can be problematic because it happens to remove unsync'd, offline-only modules and modules used by different remotestorage accounts on disconnect as well.\r\n\r\nI'm also wondering why this is the default behavior to begin with. On disconnecting a remotestorage account, I think it'd be more reasonable to by default only clear local cache for modules that have been claimed for access in that account.\r\n\r\nAny thoughts?"},"comment":{"url":"https://api.github.com/repos/remotestorage/remotestorage.js/issues/comments/105528509","html_url":"https://github.com/remotestorage/remotestorage.js/issues/866#issuecomment-105528509","issue_url":"https://api.github.com/repos/remotestorage/remotestorage.js/issues/866","id":105528509,"user":{"login":"skddc","id":842,"avatar_url":"https://avatars.githubusercontent.com/u/842?v=3","gravatar_id":"","url":"https://api.github.com/users/skddc","html_url":"https://github.com/skddc","followers_url":"https://api.github.com/users/skddc/followers","following_url":"https://api.github.com/users/skddc/following{/other_user}","gists_url":"https://api.github.com/users/skddc/gists{/gist_id}","starred_url":"https://api.github.com/users/skddc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skddc/subscriptions","organizations_url":"https://api.github.com/users/skddc/orgs","repos_url":"https://api.github.com/users/skddc/repos","events_url":"https://api.github.com/users/skddc/events{/privacy}","received_events_url":"https://api.github.com/users/skddc/received_events","type":"User","site_admin":false},"created_at":"2015-05-26T13:44:32Z","updated_at":"2015-05-26T13:44:32Z","body":"> Also, I'm wondering if there's a way to claim access for additional modules and ask users for authorization without having to disconnect and reconnect.\r\n\r\nThere's no special way for that defined in the protocol. The authorization part is just OAuth, so anything that is possible with the OAuth redirect flow is possible with remoteStorage.\r\n\r\nWith remoteStorage.js, if I'm not mistaken, the widget will currently ask the user to re-auth, but not disconnect them completely."}}