"The entity type'OpenIddictToken' was not found" when scope=offline_access
See original GitHub issueHi, I’m trying to implement refresh tokens so I updated to 1.0.0-rc-1-0724 and I copied Startup and AuthController from the refresh sample.
Everything works like before but when I add scope=offline_access it gives me “The entity type’OpenIddictToken’ was not found”.
The only thing I added is:
var identity = (ClaimsIdentity)principal.Identity; identity.AddClaim(OpenIdConnectConstants.Claims.Subject, user.Id.ToString(), OpenIdConnectConstants.Destinations.AccessToken, OpenIdConnectConstants.Destinations.IdentityToken); identity.AddClaim(OpenIdConnectConstants.Claims.Email, user.Email, OpenIdConnectConstants.Destinations.AccessToken, OpenIdConnectConstants.Destinations.IdentityToken); var roles = await _userManager.GetRolesAsync(user); foreach (var role in roles) { identity.AddClaim(OpenIdConnectConstants.Claims.Role, role, OpenIdConnectConstants.Destinations.AccessToken, OpenIdConnectConstants.Destinations.IdentityToken); }
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (6 by maintainers)
Top GitHub Comments
If it helps anyone else I had to explicitly tell my DbContext in onmodelcreating to scaffold the OpenIddict objects with
Closing as we haven’t heard back from the OP.