How to fix the caching issue when assigning/unassigning custom grant-types to an oauth application in WSO2 IS 5.3.0


In order to have a better performance caching helps a lot. In the WSO2 IS world we have a default time of 15 minutes as cache timeout.

Sometimes, you may have experienced when you try to get a token from a custom grant type which is enabled in a service provider, you can get an token. But after disable it and updated it, if you try to get an token from that grant type, still you get a token. This happens due to a bug that was available in older versions of IS 5.3.0, during reading and writing to the cache.

Place where we can enable or disable grant types of a service provider

There are two steps to solve this issue. You can try either one of these to fix this issue in your IS 5.3.0

  • The best solution is to get the latest WUM updated IS 5.3.0 pack where lot of found bugs were resolved.
  • The next solution is to enable the EnableOAuthCache parameter in the identity.xml in <carbon-home>/repository/conf/identity/ folder and restart the server
<EnableOAuthCache>true</EnableOAuthCache>

Both these solutions should fix this bug. If you still have any issues on this please leave a comment below. I will help you in resolving those.

Dinali Rosemin Dabarera

Written by

A Software Engineer @WSO2 which is a leading middleware company in the world, an Identity Evangelist, a blogger, a nature lover, a traveler and a social worker

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade