Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlayGamesPlatform.IsAuthenticated() Incorrect Immediately After Calling SignOut() #12

Closed
kromenak opened this issue Jan 16, 2014 · 4 comments
Labels

Comments

@kromenak
Copy link

I found that if you call IsAuthenticated() right after calling SignOut(), IsAuthenticated will still return true. It seems that calling IsAuthenticated maybe one or more frames after calling SignOut will return the correct result.

public void SignOut()
{
    PlayGamesPlatform.Instance.SignOut();
    Debug.Log(PlayGamesPlatform.Instance.IsAuthenticated()); // returns true!
}

This is a convoluted example, but I have an event that fires in response to signing out and code listening for that event might check for authentication - it seems that the function returns an incorrect value.

I can understand if SignOut is an asynchronous function that might fail for some reason, but the interface for it suggests that you are immediately signed out.

@btco
Copy link

btco commented Jan 31, 2014

This is actually working as intended, because Sign Out is an asynchronous process -- the method should be called RequestSignOut() rather than SignOut() to make this clear.

However, it would be much more intuitive if IsAuthenticated() started to return false immediately after calling SignOut(), so I'm considering this a bug :-)

I'll fix soon! Thanks for reporting.

@btco
Copy link

btco commented Jan 31, 2014

[internal tracking# 12836546]

@btco
Copy link

btco commented Feb 19, 2014

Fixed on 0.8.01

@btco btco closed this as completed Feb 19, 2014
@WILEz75
Copy link

WILEz75 commented Aug 24, 2017

MMMhhh... no, PlayGamesPlatform.Instance.SignOut() not work fine to test on local.

http://artistic-minds.it/sharingFiles/Screenshot_21.png

Control is also done after many seconds (under a Update function), it is not a matter of waiting for the log out. Username is always the default user "Lerpz".

        public void SignOut()
        {
            if (mClient != null)
            {
                mClient.SignOut();
            }

            mLocalUser = new PlayGamesLocalUser(this);
        }

         this the problem:  mLocalUser = new PlayGamesLocalUser(this); 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants