Skip to content

Commit

Permalink
fix logout
Browse files Browse the repository at this point in the history
  • Loading branch information
chaitanyapotti committed Oct 26, 2023
1 parent 6ee36d8 commit 09f1738
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 9 additions & 0 deletions Assets/Plugins/Web3AuthSDK/Api/Web3AuthApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ public IEnumerator logout(LogoutApiRequest logoutApiRequest, Action<JObject> cal
var request = UnityWebRequest.Post($"{baseAddress}/store/set", data);
yield return request.SendWebRequest();

// Debug.Log("baseAddress =>" + baseAddress);
// Debug.Log("key =>" + logoutApiRequest.key);
// Debug.Log("request URL =>"+ requestURL);
// Debug.Log("request.isNetworkError =>" + request.isNetworkError);
// Debug.Log("request.isHttpError =>" + request.isHttpError);
// Debug.Log("request.isHttpError =>" + request.error);
// Debug.Log("request.result =>" + request.result);
// Debug.Log("request.downloadHandler.text =>" + request.downloadHandler.text);

if (request.result == UnityWebRequest.Result.Success)
{
string result = request.downloadHandler.text;
Expand Down
3 changes: 2 additions & 1 deletion Assets/Plugins/Web3AuthSDK/Web3Auth.cs
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,8 @@ private void sessionTimeOutAPI()
try
{
KeyStoreManagerUtils.deletePreferencesData(KeyStoreManagerUtils.SESSION_ID);
KeyStoreManagerUtils.deletePreferencesData(web3AuthOptions.loginConfig?.Values.First()?.verifier);
if (web3AuthOptions.loginConfig != null)
KeyStoreManagerUtils.deletePreferencesData(web3AuthOptions.loginConfig?.Values.First()?.verifier);

this.Enqueue(() => this.onLogout?.Invoke());
}
Expand Down

0 comments on commit 09f1738

Please sign in to comment.