• Discuss all the things!

    155 Topics
    557 Posts
    Our Authentication Architecture

    We use BrainCloud External Authentication (AuthenticateExternal) as our primary auth method.
    We do not use AuthenticateAnonymous at all.

    Our flow is:

    Client calls our own backend server with a device identifier (SystemInfo.deviceUniqueIdentifier) Our server creates/finds an account in our own identity provider using a deterministic anonymous ID derived from the device identifier Our server then calls BrainCloud S2S API (SYS_CREATE_USER_EXTERNAL_AUTH) to create a BrainCloud profile before returning a response to the client Our server returns a user ID and access token to the client The client then calls AuthenticateExternal(userId, accessToken, externalAuthName, forceCreate: true)

    The relevant server-side code (Step 3):

    public async Task<AccountData> EnsureExternalAccountAsync(string externalId) { var account = await BrainCloudS2SClient.CallAsync<AccountData>( "friend", "GET_PROFILE_INFO_FOR_EXTERNAL_AUTH_ID_IF_EXISTS", ...); if (string.IsNullOrEmpty(account.BrainCloudProfileId)) { account = await BrainCloudS2SClient.CallAsync<AccountData>( "user", "SYS_CREATE_USER_EXTERNAL_AUTH", ...); } return account; } The Problem

    Since launch, zero users are counted as New Users in the BrainCloud dashboard.
    Every user appears as a Returning User.

    Questions

    Q1. When AuthenticateExternal is called and the profile already exists (created earlier via SYS_CREATE_USER_EXTERNAL_AUTH S2S), does BrainCloud return "newUser": "false" — even if the user has never called AuthenticateExternal before?

    Q2. Does BrainCloud's New User analytics (retention cohorts, DAU new/returning breakdown) rely on the newUser flag from AuthenticateExternal, on the profile's createdAt timestamp, or something else?

    Q3. If the S2S pre-creation is the cause, what is the recommended pattern?

    Should we remove the S2S pre-creation and let AuthenticateExternal(forceCreate: true) be the sole profile creator? Or is there a way to mark an S2S-created profile so BrainCloud still counts the first AuthenticateExternal call as a New User event?
  • Suggestions for improvements, new features, etc.

    43 Topics
    138 Posts

    Dear @dbgtdbz2 ,

    About your feature request #1, “Please allow specifying items as conditions for purchasing virtual or bundle items."

    I have developed a mockup for this feature.

    If we add your Prerequisite Items request to the system as shown, will this work for your needs?

    Note that in this implementation, the prerequisite requirement applies only to a Virtual Currency transaction. PrereqItemsMockup.png

    Please let me know at your convenience,
    Regards,
    John H
    -Design

  • Questions specific to particular APIs, libraries, etc.

    63 Topics
    260 Posts

    It's been resolved. Thank you for your response!

  • General cloud code discussions...

    35 Topics
    149 Posts

    Q1: The removed player is completely excluded from reward calculation, so if the deletion happens before the job runs, that player is never iterated over and receives no rank or rewards.
    Q2: Yes, the modified score will be used. The job always reads live state. Note that whether the score actually gets modified depends on the leaderboard type (e.g., for the LOW_VALUE type, only updates if the new score is less than the existing)
    Q3: No backfilling, the next joiner goes to the latest instance, not the freed spot in ^2. No loop over earlier instances (^1, ^2) ever happens. The next joiner goes to ^3 (or ^4 if ^3 is full). The freed spot in ^2 stays empty permanently.

  • brainCloud's online learning tutorials and examples.

    3 Topics
    3 Posts

    brainCloud developers have just release several playable builds of our famous examples! See our cool features in action. Find them at https://getbraincloud.com/demos for Windows, Mac, online and mobile.

brainCloud 5 is alive!

brainCloud 5 features Portal-X (our next-gen portal), Integrated Forums (you found them), our new Bootcamp training videos, and more!

Join the discussion here!

brainCloud Bootcamp!
brainCloud's new video learning portal is now online! Go check out brainCloud BootCamp!

Need to report a defect?
Use the chat widget from the Design Portal - or send an email to support at getbraincloud.com. Thanks!