Twift icon indicating copy to clipboard operation
Twift copied to clipboard

[Feature Request]Multiple accounts

Open arbyruns opened this issue 3 years ago • 8 comments

I've been playing around with the ability to add multiple accounts, but I'm not seeing that as a possibility. Am I missing something?

arbyruns avatar Sep 07 '22 23:09 arbyruns

One Twift client should be responsible for one user. If you want to support multiple users you can replace old Twift client bound to user1 with a new client bound to user2

ramzesenok avatar Nov 24 '22 19:11 ramzesenok

@ramzesenok thank you! I'll give this a try.

arbyruns avatar Nov 29 '22 01:11 arbyruns

@ramzesenok I went ahead and gave this a shot and the problem I'm running into is that when Twift.Authentication() method is called the current account is still logged in and no way to log that account out.

arbyruns avatar Jan 08 '23 18:01 arbyruns

@arbyruns you mean in the browser that is opened to confirm login?

ramzesenok avatar Jan 11 '23 11:01 ramzesenok

@ramzesenok correct. I think it has to do with ASWebAuthenticationSession. If launch safari Twitter is logged in. If I log myself out the new session does not have me logged in. Does that make sense?

arbyruns avatar Jan 11 '23 11:01 arbyruns

@arbyruns totally, this is how it works and it has nothing to do with Twift. If you want to log in a different user you first have to log out from the current user in browser

ramzesenok avatar Jan 11 '23 11:01 ramzesenok

@ramzesenok I wonder if adding support prefersEphemeralWebBrowserSession would help with this? My understanding is that the session in Safari does not need to remain logged in. However, the other challenge I'm finding with adding support for prefersEphemeralWebBrowserSession is that I can't ever get to authorization pages on Twitter.

arbyruns avatar Jan 11 '23 14:01 arbyruns

@arbyruns I believe it shouldn't log out cause the same account will be used when you use Twitter's web version

ramzesenok avatar Jan 11 '23 17:01 ramzesenok