Khan / khan-mobile

You’re probably looking for www.github.com/khan/mobile
237 stars 34 forks source link

logging out of fb/share #90

Closed marcia closed 13 years ago

marcia commented 13 years ago

if i start out totally logged out, decide to share on facebook, and log in from share, what is the best possible way to log out from there? it seems that pressing the "log in [to khan academy w either goog or fb]" button does the trick, but it seemed a little roundabout. shrug

adamjernst commented 13 years ago

There isn't really a way to do that (except, as you point out, clicking Log In which clears cookies). @jasonrr is one needed?

I think this is more of a bug with Twitter/Facebook; they should have links that say "Not Adam? Log out."

jasonrr commented 13 years ago

@adamjernst I am comfortable with not having that functionality until sharekit includes it. Can we just double check that we aren't doing something that we shouldn't be that's preventing this functionality from showing up?

adamjernst commented 13 years ago

Actually we're no longer using ShareKit (it's not the best, unfortunately). We're just directly embedding the Facebook/Twitter share pages in a web view, so definitely not doing anything we shouldn't.

adamjernst commented 13 years ago

(That also explains why it maintains your login state. Cookies are shared among all web views in the app; when you log in to FB/Twitter in the share pane, the cookies stay there. We clear cookies before login, only because otherwise you wouldn't be able to switch accounts if you choose Facebook for log in after sharing something previously. We could clear cookies after every share, but that is way excessive.)

jasonrr commented 13 years ago

OK. As long as we're following the docs on how to integrate, I'm fine with not having a log out option. I've honestly never looked for one after sharing from an app (and usually want it to remember me).

Where this could get weird is with shared devices. We'll have to address that once we understand the nature/scope of that problem.

adamjernst commented 13 years ago

Yup. Just a note: we could add our own "Not you?" button in the toolbar. The button would clear cookies and restart the share. This seems inelegant though as it would appear even on the log in page, which is confusing.