Skip to content
This repository has been archived by the owner on Jul 16, 2020. It is now read-only.

Commit

Permalink
Desktop Builds: Fix issue where you didn't have to auth twice for dif…
Browse files Browse the repository at this point in the history
…ferent interactive projects

There was an issue where if you had more than one, different interactive project installed on your PC, the SDK would not re-prompt the user to log in. The correct behavior is to prompt the user to re-authenticate with Mixer the first time when they launch a game with a different interactive project ID.

Behavior will likely not be noticable for developers because you will only have 1 project ID at this point. But the case could hit end users.
  • Loading branch information
payzer committed Dec 5, 2017
1 parent 778ea9e commit 283e04e
Show file tree
Hide file tree
Showing 7 changed files with 457 additions and 210 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -1013,6 +1013,8 @@ private bool TryGetAuthTokensFromCache()
key = key.OpenSubKey("MixerInteractive", true);
key.CreateSubKey("Configuration");
key = key.OpenSubKey("Configuration", true);
key.CreateSubKey(AppID + "-" + ProjectVersionID);
key = key.OpenSubKey(AppID + "-" + ProjectVersionID, true);
_authToken = key.GetValue("MixerInteractive-AuthToken") as string;
_oauthRefreshToken = key.GetValue("MixerInteractive-RefreshToken") as string;
#elif UNITY_WSA
Expand Down Expand Up @@ -1042,6 +1044,8 @@ private void WriteAuthTokensToCache()
key = key.OpenSubKey("MixerInteractive", true);
key.CreateSubKey("Configuration");
key = key.OpenSubKey("Configuration", true);
key.CreateSubKey(AppID + "-" + ProjectVersionID);
key = key.OpenSubKey(AppID + "-" + ProjectVersionID, true);
key.SetValue("MixerInteractive-AuthToken", _authToken);
key.SetValue("MixerInteractive-RefreshToken", _oauthRefreshToken);
#elif UNITY_WSA
Expand Down
Loading

0 comments on commit 283e04e

Please sign in to comment.