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

Await _parseClient.GetCurrentUser is null after login #362

Open
4 tasks done
chamboryk opened this issue Oct 3, 2021 · 1 comment
Open
4 tasks done

Await _parseClient.GetCurrentUser is null after login #362

chamboryk opened this issue Oct 3, 2021 · 1 comment
Labels

Comments

@chamboryk
Copy link

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
@chamboryk chamboryk changed the title [v2.0.0-develop-1] await _parseClient.UserController.LogInAsync(/*Params*/) == null [v2.0.0-develop-1] await _parseClient.GetCurrentUser();//currentUser == null after logIn Oct 3, 2021
@Kellokes
Copy link

Kellokes commented Feb 6, 2022

Hi all,

Any update on this bug? What is the best way to fix or create a workaround for this? I saw that when I use this cmd _parseClient.GetCurrentUser().SessionToken; I received the Token when the Login is Successful, otherwise I get null, would checking this be a good alternative to proceed with login validation?

@mtrezza mtrezza changed the title [v2.0.0-develop-1] await _parseClient.GetCurrentUser();//currentUser == null after logIn Error await _parseClient.GetCurrentUser();//currentUser == null after logIn Feb 6, 2022
@mtrezza mtrezza changed the title Error await _parseClient.GetCurrentUser();//currentUser == null after logIn Await _parseClient.GetCurrentUser is null after logIn Feb 6, 2022
@mtrezza mtrezza changed the title Await _parseClient.GetCurrentUser is null after logIn Await _parseClient.GetCurrentUser is null after login Feb 6, 2022
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