Skip to content

Commit

Permalink
fix login
Browse files Browse the repository at this point in the history
  • Loading branch information
kaihirota committed Oct 14, 2024
1 parent ab3dd77 commit 8ed42d9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
4 changes: 0 additions & 4 deletions Assets/Shared/Scripts/UI/LevelCompleteScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,7 @@ private async void OnContinueWithPassportButtonClicked()
ShowLoading(true);

// Log into Passport
#if (UNITY_ANDROID && !UNITY_EDITOR_WIN) || (UNITY_IPHONE && !UNITY_EDITOR_WIN) || UNITY_STANDALONE_OSX
await Passport.Instance.LoginPKCE();
#else
await Passport.Instance.Login();
#endif

// Successfully logged in
// Save a persistent flag in the game that the player is logged in
Expand Down
8 changes: 0 additions & 8 deletions Assets/Shared/Scripts/UI/MainMenu.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ async void OnEnable()
string redirectUri = null;
string logoutUri = null;

#if (UNITY_ANDROID && !UNITY_EDITOR_WIN) || (UNITY_IPHONE && !UNITY_EDITOR_WIN) || UNITY_STANDALONE_OSX
redirectUri = "immutablerunner://callback";
logoutUri = "immutablerunner://logout";
#endif
passport = await Passport.Init(clientId, environment, redirectUri, logoutUri);

// Check if the player is supposed to be logged in and if there are credentials saved
Expand Down Expand Up @@ -95,11 +91,7 @@ async void OnLogoutButtonClick()
ShowLoading(true);

// Logout
#if (UNITY_ANDROID && !UNITY_EDITOR_WIN) || (UNITY_IPHONE && !UNITY_EDITOR_WIN) || UNITY_STANDALONE_OSX
await passport.LogoutPKCE();
#else
await passport.Logout();
#endif

// Reset the login flag
SaveManager.Instance.IsLoggedIn = false;
Expand Down

0 comments on commit 8ed42d9

Please sign in to comment.