Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disconnect from remote storage when logging out #42

Open
brolund opened this issue Aug 28, 2012 · 4 comments
Open

Disconnect from remote storage when logging out #42

brolund opened this issue Aug 28, 2012 · 4 comments

Comments

@brolund
Copy link
Contributor

brolund commented Aug 28, 2012

When logging out today, you are still (somehow, need to investigate) authorized in the remote storage. We need to put in an option somehow for disconnecting to the remote store as well.

Sometimes it is nice to be able to just logout to switch users back and forth, but sometimes I guess it is relevant not to be able to login again just providing the storage id.

@jancborchardt
Copy link
Contributor

This needs to be decided at the remoteStorage.js level – please don’t decide that in the app itself. Currently you need to log out of apps and storage separately because signing out of one app shouldn’t affect another.

Signing out and switching users is mainly for development purposes, for that you can also use different browsers and incognito instances. The main use case will be one remoteStorage for everything.

@brolund
Copy link
Contributor Author

brolund commented Aug 28, 2012

Preferably, I'd do this by giving the user an option to go to the remote storage provider and totally exit.

@jancborchardt
Copy link
Contributor

Good point, this could be a general design pattern for unhosted apps: on the log out screen, give people a link to their storage, in case they want to log out of that too. If they don’t want to do that, they can just ignore it.

@michielbdejong
Copy link

connecting/disconnecting is no longer handled by the app code in 0.7, it's
now entirely done by the widget. this means the app doesn't even get to
control (in theory) whether the user is connected or not, and to where.

the app is informed of the session state, which can be anonymous,
connected(idle), connected(offline) or connected(busy). when you disconnect
you do this on the widget. disconnecting clears all local cache and brings
you to a new, empty anonymous session. the app receive an event to indicate
that the app went from connected(idle) state to anonymous state.

about the authorizations - there are 4 situations:

  • not logged in to storage, app first use -> you have to log in and allow
  • not logged in to storage, but have used app before -> just have to log in
  • logged in to storage, app first use -> you just have to click 'allow'
  • logged in and have used app before -> you don't get any dialog, it just
    flashes back immediately to the app.

as Jan said, this behaviour is independent of whether you disconnect from
your storage. and also as you both remarked, it might be useful to remind
the user "don't forget to also log out of your storage if you have not
already done so", because it will indeed be easy to forget. in fact,
facebook capitalizes on that - i often find myself logged in to facebook
because sometime earlier that week i used facebook connect somewhere, and
you have to log in and then you stay logged in.

On Tue, Aug 28, 2012 at 10:34 AM, Jan-Christoph Borchardt <
[email protected]> wrote:

Good point, this could be a general design pattern for unhosted apps: on
the log out screen, give people a link to their storage, in case they want
to log out of that too. If they don’t want to do that, they can just ignore
it.


Reply to this email directly or view it on GitHubhttps://github.com//issues/42#issuecomment-8084817.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants