I\'m new at IdentityServer4. I read I need to implement an IPersistedGrantStore
to store refresh tokens into a table like PersistedGrants
in my dat
The key will be to implement IPersistedGrantStore
using whatever backend you like, then to tell IdentityServer to use that implementation by registering the implementation in the dependency injection system.
For example, if you call your implementation PersistedGrantStore
, then you could register the implementation like this:
services.AddTransient
You can see that essentially this is all that the EntityFramework implementation does, once you take away all the EntityFramework stuff.
Later when IdentityServer wants to persist a grant, it will get your implementation and call the appropriate method. So you don't have to do anything, other than inject your implementation into IdentityServer so it can do whats needed.