GitHawk icon indicating copy to clipboard operation
GitHawk copied to clipboard

Sign in after sign out issue

Open jdisho opened this issue 7 years ago • 6 comments

First of all, thank you for this amazing project. @rnystrom I have an issue with GitHawk that I cannot sign in with other credentials after a sign out. When I press the sign in button, the app shows the same profile as before without asking me to put the credentials.

I haven't checked the code thoroughly, but probably you are storing the token in the Keychain and not removing it after a sign out.

jdisho avatar Feb 21 '18 00:02 jdisho

Ugh I forgot about this! It’s an issue with the SF auth saving your credentials since last login and just automatically logging you in...

There might be another issue tracking this with more detail. I’ll go look.

In the meantime if you delete the app and reinstall it should work.

And thanks for using the app!

Sent with GitHawk

rnystrom avatar Feb 21 '18 00:02 rnystrom

It was brought up in #112, but closed after adding multiple account support back. Ya this is a huge drawback with using SFAuthenticationSession... you can't sign out. I think you'd have to go to Safari.app > github.com > sign out and then come back to GitHawk.app and sign in again?

Maybe we should just ditch SFAuthenticationSession and go back to SFSafariViewController. Even though its technically more work on the user, its just so much simpler...

rnystrom avatar Feb 21 '18 03:02 rnystrom

Oh yeah this is tricky. 😕

I guess we go back to SFSafariViewController? Is there really no way to sign out with SFAuthenticationSession? Seems weird.

BasThomas avatar Feb 21 '18 06:02 BasThomas

A simple google search for STAuthenticateionSession log out or clearing cookies, gave me answer that there is no easy way of logging out. This SO question have some workaround but it's not a good option for our users.

So the options are either move to SFSafariViewController or to show a message that they have to log out from safari.

rizwankce avatar Feb 21 '18 07:02 rizwankce

Ya let's just ditch SFAuth and go back to Safari 😢

I get the point that SFAuth is supposed to be quick to login w/ your existing Safari.app session, but seems pretty weird.

One last option we could consider is on "Sign Out" show an alert window that says "You must log out of github.com on Safari.app" and then give 2 alert action options: "cancel" and "Open Safari.app" which could direct you to github.com's signout page?

We'd still have a case where you end up not signing out, come back to GitHawk and the sign-in button immediately signs in... but I guess in that case you should know you didn't signout on the .com.

Idk, its all weird.

rnystrom avatar Feb 21 '18 14:02 rnystrom

As a user, I wouldn't like doing all those actions just for a sign out. @rnystrom In my opinion SFSafariViewController fits better.

jdisho avatar Feb 21 '18 19:02 jdisho