From cd8f6aa2c7863a0f18c4df272c829736b560b5a1 Mon Sep 17 00:00:00 2001 From: Mehmet Ozdemir Date: Fri, 21 Jan 2022 13:47:57 +0000 Subject: [PATCH 1/3] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 40 ++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..c48b05e9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,40 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: bug +assignees: '' + +--- + +This form is for reporting Unity Plugin issues only. To report an issue with the Play Games Service (non-SDK related), check [Google Play Games Services Support](https://developers.google.com/games/services/support). +*Once you've read this section and determined that your issue is appropriate for this repository, please delete this section.* + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. ___ +2. ___ +3. ___ +4. ___ + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Observed behavior** +A clear and concise description of what you observed. + +**Bug Report** +[Capture](https://developer.android.com/studio/debug/bug-report) a bug report and share the Google Drive link. If the bug report contains sensitive information, then make it private and only give access to requests from `...@google.com` accounts. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Versions** +- Unity version: ___ +- Google Play Games Plugin for Unity version: ___ + +**Additional context** +Add any other context about the problem here. From ad4e21f066295303ab79b0770221481f694c443e Mon Sep 17 00:00:00 2001 From: Heechang Jung Date: Mon, 24 Jan 2022 17:10:16 +0900 Subject: [PATCH 2/3] Add TokenRefresh --- .../Platforms/Android/AndroidClient.cs | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/source/PluginDev/Assets/GooglePlayGames/Platforms/Android/AndroidClient.cs b/source/PluginDev/Assets/GooglePlayGames/Platforms/Android/AndroidClient.cs index c90a7c65..9b96f994 100644 --- a/source/PluginDev/Assets/GooglePlayGames/Platforms/Android/AndroidClient.cs +++ b/source/PluginDev/Assets/GooglePlayGames/Platforms/Android/AndroidClient.cs @@ -65,6 +65,18 @@ internal AndroidClient(PlayGamesClientConfiguration configuration) this.mConfiguration = Misc.CheckNotNull(configuration); } + /// + ///Refresh id token in session + /// + /// callback with result value. + public void TokenRefresh(Action callback) + { + if(mTokenClient != null) + { + mTokenClient.FetchTokens(true, callback); + } + } + /// /// public void Authenticate(bool silent, Action callback) @@ -76,7 +88,14 @@ public void Authenticate(bool silent, Action callback) if (mAuthState == AuthState.Authenticated) { Debug.Log("Already authenticated."); - InvokeCallbackOnGameThread(callback, SignInStatus.Success); + + if(mTokenClient == null) return; + + TokenRefresh((result)=>{ + bool succeed = result == 0 /* CommonStatusCodes.SUCCEED */; + if(succeed) InvokeCallbackOnGameThread(callback, SignInStatus.Success); + else InvokeCallbackOnGameThread(callback, SignInStatus.Failed); + }); return; } } From e7a8a62f445bb8b96b159d06ca962acc6d4322f7 Mon Sep 17 00:00:00 2001 From: Heechang Jung Date: Tue, 25 Jan 2022 12:20:42 +0900 Subject: [PATCH 3/3] Change Authenticate --- .../Assets/GooglePlayGames/Platforms/Android/AndroidClient.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/PluginDev/Assets/GooglePlayGames/Platforms/Android/AndroidClient.cs b/source/PluginDev/Assets/GooglePlayGames/Platforms/Android/AndroidClient.cs index 9b96f994..c63c392a 100644 --- a/source/PluginDev/Assets/GooglePlayGames/Platforms/Android/AndroidClient.cs +++ b/source/PluginDev/Assets/GooglePlayGames/Platforms/Android/AndroidClient.cs @@ -92,9 +92,7 @@ public void Authenticate(bool silent, Action callback) if(mTokenClient == null) return; TokenRefresh((result)=>{ - bool succeed = result == 0 /* CommonStatusCodes.SUCCEED */; - if(succeed) InvokeCallbackOnGameThread(callback, SignInStatus.Success); - else InvokeCallbackOnGameThread(callback, SignInStatus.Failed); + InvokeCallbackOnGameThread(callback, (SignInStatus)result); }); return; }