Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IdentityServer4 - Deleting expired persistent grants

Is this handled automatically somehow or should I have a scheduled job that deletes these periodically? I suppose keeping them for audit purposes makes sense but revocation does a hard delete so I don't think that's the intent of this table/entity.

like image 731
mackie Avatar asked Oct 25 '25 05:10

mackie


1 Answers

This works for me:

services.AddIdentityServer().AddOperationalStore(options =>
                                         {
                                             options.EnableTokenCleanup = true;
                                             options.TokenCleanupInterval = 3600; // 1 hour
                                         });
like image 86
Jeff Keslinke Avatar answered Oct 26 '25 23:10

Jeff Keslinke