Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Twitter API - Logout

I'm using OAuth in my web app, and users can login with twitter.

I want to add "switch twitter account" button, which actually clears the session and then opens the authorize_url.

As clearing the session in my web app doesn't log out of twitter, the authorize_url will automatically authenticate the current twitter.com user. That means I can't do logout, unless I send the user to twitter.com.

Is it possible with the API? What is the best way to implement this?

like image 401
elado Avatar asked Dec 25 '09 10:12

elado


1 Answers

You can use oauth/authenticate and add force_login=true as specified in GET oauth/authenticate. This will prompt the user with a login form.

like image 114
abraham Avatar answered Sep 28 '22 08:09

abraham