rockwotj / FirebasePasswordKeeperiOS

An authentication example with iOS and Firebase
0 stars 2 forks source link

Signing out of a Google account didn't fully sign out #3

Open fisherds opened 8 years ago

fisherds commented 8 years ago

I'd prefer the logout button to be a real log out. Right now when you sign in via Google login, then logout, you can click Sign in with Google again and it'll jump you past the password step. I get that it's a demo, but it's not really appropriate for logout to not really logout.

Also it makes it confusing how you switch Google accounts.

rockwotj commented 8 years ago

I don't know if I can change this, as it's saved through the browser. But I'll look into it.

fisherds commented 8 years ago

I wonder if disconnect is needed in addition to signOut

// Marks current user as being in the signed out state.

// Disconnects the current user from the app and revokes previous authentication. If the operation // succeeds, the OAuth 2.0 token is also removed from keychain.

rockwotj commented 8 years ago

I went to look at this and got the following error when I log out quickly after logging in.

Cannot form weak reference to instance (0x7c089850) of class PasswordKeeper.LoginViewController. It is possible that this object was over-released, or is in the process of deallocation.

There error is being thrown here: https://github.com/rockwotj/FirebasePasswordKeeperiOS/blob/master/PasswordKeeper/AppDelegate.swift#L61

Have you ever gotten this issue?

fisherds commented 8 years ago

Haven't seen it specifically, but usually you can fix a problem by just doing what you want to happen in a different way. For example here, could you just make a new segue in the storyboard and perform that segue to go back??? I really haven't looked at the details, I'm guessing you aren't doing things like that to avoid the back button. Maybe the Login could be a modal of the main view that is shown and then it's not swapping out the rootViewController, but still avoids the back button??? Anyway, I predict there is a solution to the problem by just doing what you want in a different way.

Gotta love lame answers. :)

rockwotj commented 8 years ago

I'm not using segues in the storyboard, as I need to programmatically decide at boot which screen is shown first. Maybe I can move to use segues after that...

rockwotj commented 8 years ago

I fixed that issue... but the disconnect button did not change anything :disappointed:

rockwotj commented 8 years ago

I was able to fully sign out using clicking my email in the top right then clicking "signout".