parse-community / parse-community/Parse-SDK-dotNET

Await _parseClient.GetCurrentUser is null after login

Open
#362 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type:bug
Dominant language
C#
Stars
335
Forks
258
PR merge metrics
No merged PRs in 30d

Description

New Issue Checklist
Issue Description

After login, the current user is null Unity 2020.3.11

Steps to reproduce
    _parseClient = new ParseClient("myAppId", "http://localhost:1337/parse/", "",
        new LateInitializedMutableServiceHub { },
        new MetadataMutator
        {
            EnvironmentData = new EnvironmentData { OSVersion = SystemInfo.operatingSystem, Platform = $"Unity {Application.unityVersion} on {SystemInfo.operatingSystemFamily}", TimeZone = TimeZoneInfo.Local.StandardName },
            HostManifestData = new HostManifestData { Name = Application.productName, Identifier = Application.productName, ShortVersion = Application.version, Version = Application.version }
        },
        new AbsoluteCacheLocationMutator
        {
            CustomAbsoluteCacheFilePath = $"{Application.persistentDataPath.Replace('/', Path.DirectorySeparatorChar)}{Path.DirectorySeparatorChar}Parse.cache"
        }
    );
    Debug.Log($"{Application.persistentDataPath.Replace('/', Path.DirectorySeparatorChar)}{Path.DirectorySeparatorChar}Parse.cache");
    _parseClient.Publicize();

            var loginResult = await _parseClient.UserController.LogInAsync(SystemInfo.deviceUniqueIdentifier, SystemInfo.deviceUniqueIdentifier, new LateInitializedMutableServiceHub { }); //login result not null
            var currenSession = await _parseClient.GetCurrentSessionAsync(); //currentSession == null
            var currentUser = _parseClient.GetCurrentUser();//currentUser == null
Actual Outcome

var currentUser = _parseClient.GetCurrentUser();//currentUser == null

Expected Outcome

var currentUser = _parseClient.GetCurrentUser();//currentUser != null

Environment

Server

  • Parse Server version: ^4.5.0
  • Operating system: Windows 10
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): Local (http://localhost:1337/parse/)

Database

  • System (MongoDB or Postgres): MongoDB
  • Database version: N/A
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): remote MongoDB Atlas

Client

  • Parse .NET SDK version: v2.0.0-develop-1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reported ParseClient setup and trace LogInAsync, GetCurrentSessionAsync, and GetCurrentUser in the SDK. Reproduce the Unity 2020.3.11 flow using the listed Parse Server and SDK versions, then add or update a regression test showing that a successful login exposes the current user.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, unity
Domain
authentication, game-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.