title: Auth0 logout issue in Xamarin.Android
body: <p>Currently in my Xamairn.Android I have 2 activities Mainactivity and SignoutActivity.
  In my Mainactivity I have a button where when user clicks the button it goes to SignoutActivity.</p>
  
  <p>Here I have implemented the signout codes of Auth0.</p>
  
  <p>Here are the codes-
  In MainAcitivity-</p>
  
  <pre><code>this.Signout.Click += delegate
      {
           using (var intent = new Intent(this, typeof(SignOutActivity)))
              {
                  this.StartActivity(intent);
              }
      };
  </code></pre>
  
  <p>SignOutAcitivity-</p>
  
  <pre><code>protected override void OnCreate(Bundle savedInstanceState)
  {
      base.OnCreate(savedInstanceState);
      this.LogoutAsync();
      Finish();
  
  }
  public async Task&lt;BrowserResult&gt; LogoutAsync()
  {
      var clientOptions = new Auth0.OidcClient.Auth0ClientOptions
      {
          Domain ="",
          ClientId = "",
          Scope = "openid email offline_access",
          Browser = new PlatformWebView()
      };
      var logoutUrl = "Signout URl";
      string redirectUri = "I have proper callback uri";
  
      Dictionary&lt;string, string&gt; dictionary = new Dictionary&lt;string, string&gt;();
      dictionary.Add("client_id", "random1234");
      dictionary.Add("returnTo", clientOptions.RedirectUri);
  
      string endSessionUrl = new RequestUrl(logoutUrl).Create(dictionary);
  
      var logoutRequest = new LogoutRequest();
      BrowserResult browserResult = null;
  
      browserResult = await clientOptions.Browser.InvokeAsync(new BrowserOptions(endSessionUrl, redirectUri)
      {
          Timeout = TimeSpan.FromSeconds((double)logoutRequest.BrowserTimeout),
          DisplayMode = logoutRequest.BrowserDisplayMode
      });
  
      return browserResult;
  }
  </code></pre>
  
  <p>Platformview-</p>
  
  <pre><code>class PlatformWebView : IBrowser
  {
  public Task&lt;BrowserResult&gt; InvokeAsync(BrowserOptions options)
  {
      if (string.IsNullOrWhiteSpace(options.StartUrl))
      {
          throw new ArgumentException("Missing StartUrl", nameof(options));
      }
  
      if (string.IsNullOrWhiteSpace(options.EndUrl))
      {
          throw new ArgumentException("Missing EndUrl", nameof(options));
      }
      var tcs = new TaskCompletionSource&lt;BrowserResult&gt;();
  
      void Callback(string response)
      {
          ActivityMediator.Instance.ActivityMessageReceived -= Callback;
  
          // set result
          if (response == "UserCancel")
          {
              tcs.SetResult(new BrowserResult { ResultType = BrowserResultType.UserCancel });
          }
          else
          {
              tcs.SetResult(new BrowserResult
              {
                  Response = response,
                  ResultType = BrowserResultType.Success
              });
          }
      }
      ActivityMediator.Instance.ActivityMessageReceived += Callback;
      var uri = Android.Net.Uri.Parse(options.StartUrl);
      var intent = new Intent(Intent.ActionView, uri);
      intent.AddFlags(ActivityFlags.NoHistory)
          .AddFlags(ActivityFlags.NewTask);
      Application.Context.StartActivity(intent);
      return tcs.Task;
  }
  }
  }
  </code></pre>
  
  <p>Problem is browser never returns to app,Also I have put a debugger at return browserResult,this debugger also does not hit.Please help me.</p>