Asif Rehman
Asif Rehman

Reputation: 3

user.identity.getuserid() return user id value in web api

I have an issue on sign out process as after sign out user.identity.getuserid() returns the userid value, whether it should return null. Here is my code,

    public async Task<IHttpActionResult> Logout()
    {
        return Ok();
    }

Upvotes: 0

Views: 152

Answers (1)

Robbert Draaisma
Robbert Draaisma

Reputation: 463

The identity is stored in a cookie and sent to the server in the http request. Sign out tells the browser to expire/ delete the cookie. However you’ve set the breakpoint before sending back the response to the browser. Next request should have User as null

Upvotes: 1

Related Questions