Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • Bugs /
avatar image
Question by darakevg · Aug 27, 2018 at 02:11 AM · Authentication

LoginWithCustomID creates a new user when session expires and returns "no user found" if CreateAccount is set to false

If I wait until the session expires and call LoginWithCustomID a new user is created every time even though there is a user already using the same id. If CreateAccount is set to false "user not found" is returned.

Login code:


function DoExampleLoginWithCustomID() {

    PlayFab.settings.titleId = "TITLE_ID_REMOVED";

    var loginRequest = {

        // Currently, you need to look up the correct format for this object in the API-docs:

        // https://api.playfab.com/documentation/Client/method/LoginWithCustomID

        TitleId: PlayFab.settings.titleId,

        CustomId: "GettingStartedGuide",

        CreateAccount: true

    };

    PlayFabClient.LoginWithCustomID(loginRequest, LoginCallback);

}

First Output:

Congratulations, you made your first successful API call!

Test Running!

Datetime: Mon Jul 23 2018 20:26:33 GMT-0700 (PDT)

Playfab ID: 1DB9348EE6AA4F66

Second output. Same code later time.

Congratulations, you made your first successful API call!

Test Running!

Datetime: Mon Jul 23 2018 21:50:21 GMT-0700 (PDT)

Playfab ID: 73F46317BFFA3AA2

If CreateAccount is set to false and the session is over "User not found" is returned even though the CustomID never changes.

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Brendan · Aug 27, 2018 at 12:55 PM

I just tested using a Custom ID that's linked to an account that hasn't signed in for ages on my test account (months, really), and it logged into that account, no problem. Looking at your title, it's hard to say what's happening exactly, but we have a tremendous number of titles using Custom ID login, and the code path is actually the same regardless of whether you logged in within the last 24 hours, so it's not clear what exactly it is you're seeing. It is the case that if you unlink the Custom ID, a new account would be created. But in your title, there's actually only one PlayFab ID with that Custom ID attached - the others are an error in the Game Manager, showing out-of-date info. Can you provide any additional info for your repro?

Comment

People who like this

0 Show 2 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image darakevg · Aug 29, 2018 at 02:52 AM 0
Share

I made a test app and this is what I see in the Game Manager from the last 24 hours.

I was using the example unity login:

 var request = new LoginWithCustomIDRequest { CustomId = "GettingStartedGuide", CreateAccount = true};
 PlayFabClientAPI.LoginWithCustomID(request, done, OnLoginFailure);

This is the only call the test makes to Playfab and I did not delete or unlink any accounts from the panel.

players.png (121.0 kB)
players.jpg (92.1 kB)
avatar image Brendan ♦♦ darakevg · Aug 29, 2018 at 05:50 AM 0
Share

So again, there's an issue in the Game Manager (for which we have a bug open) where it is showing the Custom ID linked in some cases where it is no longer linked. We'll have that fixed as soon as we can. For your issue, can you provide a specific repro case, using Postman? That is, using the Postman tool, can you create a player account using a Custom ID, and then on trying to log into that account, have it create a new account instead? If so, can you please provide the specific steps of your repro - again, using only the Postman tool, and please provide the specifics of each call (the values passed into the parameters).

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    3 People are following this question.

    avatar image avatar image avatar image

    Related Questions

    Unable to call Send Account Recovery from Unity SDK 3 Answers

    LoginWithApple returning NotAuthorized 1 Answer

    400 Error - ServiceUnavailable, but only on Xbox 1 Answer

    Calling AddOrUpdateContactEmail() after PlayFabClientAPI.LoginWithApple() has no reaction? 1 Answer

    No callbacks from LoginWithAndroidDeviceID? 5 Answers

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges