Base solution for your next web application
Open Closed

token_validity_key Cache size #12402


User avatar
0
ajayak created

Is this normal to have this many caches for token_validity_key?

image.png


4 Answer(s)
  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi @ajayak

    Could you please verify if the Expire Time for TokenValidityKey is specified in the CreateJwtClaims method within the TokenAuthController? Additionally, could you confirm if a deletion process for TokenValidityKey, as outlined below, is being performed in the LogOut method in your project?

    var tokenValidityKeyInClaims = User.Claims.First(c => c.Type == AppConsts.TokenValidityKey);
    await RemoveTokenAsync(tokenValidityKeyInClaims.Value);
    
  • User Avatar
    0
    ajayak created

    Hi @oguzhanagir,

    There is no change made by me in TokenAuthController.cs class. It's all framework code.
    The Logout method contains the code to remove token and CreateJwtClaims contains the logic to add the expiration time for all tokens.
    Note: I'm using Redis cache.

  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi @ajayak

    Thank you for your feedback. We have created an issue for this. You can follow the developments here. Thank you.

  • User Avatar
    0
    ajayak created

    Thankyou