You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As it seems impossible to destroy the session & cache via the OAuth.io API to implement a logout function, I implemented a Switch Account button in my application that calls for .popup('twitter') with force_login: true as specified in the Twitter API docs.
This forces the user to log in again, and therefore I can overwrite the api object returned by the .popup() method when successful. But when using this new API, it posts as the previous account (before switching), even if the tokens are different.
Okay, that's how I implemented it : it deletes related localStorage items. This method is called in the Service.login(true) method where I added if(!!force) Service.logout().
As it seems impossible to destroy the session & cache via the OAuth.io API to implement a logout function, I implemented a
Switch Account
button in my application that calls for.popup('twitter')
withforce_login: true
as specified in the Twitter API docs.This forces the user to log in again, and therefore I can overwrite the
api
object returned by the.popup()
method when successful. But when using this new API, it posts as the previous account (before switching), even if the tokens are different.Interesting bits of code (Angular service)
In my controller (stripped down but you get the idea)
<button ng-click="login(true)">Switch account</button>
The text was updated successfully, but these errors were encountered: