I followed this blog post https://www.jerriepelser.com/blog/authenticate-oauth-aspnet-core-2/ and modified to use it with Samsung's Artik service (https://developer.artik.cloud/documentation/user-management/authentication.html#obtain-a-token)
I'm able to login, but I'm unable to logout.
On the action for the logout, I have the Logout action calling to HttpContext.SignOutAsync, but it doesn't logout my current user.
private AuthenticationProperties _authenticationProperties; [AllowAnonymous]
public IActionResult Login(string returnUrl = "/")
{
_authenticationProperties = new AuthenticationProperties() { RedirectUri = returnUrl };
return Challenge(_authenticationProperties);
} public async Task Logout()
{
await HttpContext.SignOutAsync(_authenticationProperties);
if (User.Identity.IsAuthenticated)
{
// This is still true !
}
}
Any ideas in what's wrong ?