It seems the PersistedGrant table creation script defined here is not in sync with the code of IdentityServer4. I have applied that script to my database, and configured the persistence as described here, but when I test a log in, I get this error:
SqlException: Invalid column name 'ConsumedTime'. Invalid column name 'Description'. Invalid column name 'SessionId'.
The stack trace shows this to be happening in the following line of code:
IdentityServer4.EntityFramework.Stores.PersistedGrantStore.StoreAsync(PersistedGrant token)
What am I missing?
The Script you have is a old one and its archived, here is link to the new script you should use: https://github.com/IdentityServer/IdentityServer4/blob/main/src/EntityFramework.Storage/migrations/SqlServer/Migrations/PersistedGrantDb.sql