title: .Net-Core Log out of Oauth
body: <p>I've created an application which uses OAuth to login to Coinbase.  My startup configuration looks like so:</p>
  
  <pre><code>services.AddAuthentication(options =&gt;
  {
      options.DefaultAuthenticateScheme = CookieAuthenticationDefaults.AuthenticationScheme;
      options.DefaultSignInScheme = CookieAuthenticationDefaults.AuthenticationScheme;
      options.DefaultChallengeScheme = COINBASE_AUTH_ID;
  })
  .AddCookie()
  .AddOAuth(COINBASE_AUTH_ID, options =&gt;
  {
      options.ClientId = Configuration["Coinbase:ClientId"];
      options.ClientSecret = Configuration["Coinbase:ClientSecret"];
      options.CallbackPath = new PathString("/signin-coinbase");
  
      options.AuthorizationEndpoint = "https://www.coinbase.com/oauth/authorize?meta[send_limit_amount]=1";
      options.TokenEndpoint = "https://api.coinbase.com/oauth/token";
      options.UserInformationEndpoint = "https://api.coinbase.com/v2/user";
  
      COINBASE_SCOPES.ForEach(scope =&gt; options.Scope.Add(scope));
  
      options.SaveTokens = true;
  
      options.ClaimActions.MapJsonKey(ClaimTypes.NameIdentifier, "id");
      options.ClaimActions.MapJsonKey(ClaimTypes.Name, "name");
      options.ClaimActions.MapJsonKey("urn:coinbase:avatar", "avatar_url");
  
      options.Events = new OAuthEvents
      {
          OnCreatingTicket = async context =&gt;
          {
              var request = new HttpRequestMessage(HttpMethod.Get, context.Options.UserInformationEndpoint);
              request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
              request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", context.AccessToken);
              request.Headers.Add("CB-VERSION", DateTime.Now.ToShortDateString());
              var response = await context.Backchannel.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, context.HttpContext.RequestAborted);
              response.EnsureSuccessStatusCode();
  
              var user = JObject.Parse(await response.Content.ReadAsStringAsync());
  
              context.RunClaimActions(user);
          }
      };
  });
  </code></pre>
  
  <p>When a user logs in I return a challenge result and let the default authentication do it's work.</p>
  
  <pre><code>[HttpGet]
  public IActionResult Login(string returnUrl = "/")
  {
      return Challenge(new AuthenticationProperties() { RedirectUri = returnUrl });
  }
  </code></pre>
  
  <p>I'm trying to figure out how to logout but when I call Signout on the base controller nothing is happening.</p>
  
  <pre><code>[HttpGet]
  public IActionResult Logout()
  {
      this.SignOut();
      return Redirect(Url.Content("~/"));
  }
  </code></pre>
  
  <p>How can I log out of oauth?</p>