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. diff --git a/source/PluginDev/Assets/GooglePlayGames/Platforms/Android/AndroidClient.cs b/source/PluginDev/Assets/GooglePlayGames/Platforms/Android/AndroidClient.cs index c90a7c65..c63c392a 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,12 @@ 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)=>{ + InvokeCallbackOnGameThread(callback, (SignInStatus)result); + }); return; } }