question

brendan avatar image
brendan asked

LastLoginTime appears to be the current login time

Question from a developer:

In testing logins, I'm seeing the LastLoginTime being returned as the current time, rather than the time of the previous login. Is this a bug?

Account Management
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

brendan avatar image
brendan answered

Yes, thanks for reporting this - we've reproduced it and have filed a bug against it, so that it gets fixed as soon as possible.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ajon542 avatar image
ajon542 answered

I was hoping to use the LastLoginTime to determine whether a user had logged in from somewhere on a different device as follows:

PlayFabClientAPI.LoginWithFacebookInstantGamesId(new LoginWithFacebookInstantGamesIdRequest
{
    CreateAccount = true,
    InfoRequestParameters = new GetPlayerCombinedInfoRequestParams
    {
        GetUserData = true,
        UserDataKeys = null
    },
    FacebookInstantGamesSignature = signature
}, result =>
{
    Debug.Log($"LastLoginTime={result.LastLoginTime}");
    // Compare to the last login time stored locally.
// If this value is greater we know a user has logged
// in somewhere else so apply the user data to their local data. }, error => { Debug.LogError(error.GenerateErrorReport()); });

Is there another recommended way of doing this?

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Seth Du avatar image Seth Du ♦ commented ·

I believe it is feasible, via caching local data on the client.

You may also refer to Brendan's answer in this thread: How to prevent duplicate login? - Playfab Community. Please feel free to tell us if you have any other questions.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.