Closed fopsdev closed 8 years ago
With the latest OpenIddict bits, all the endpoints are disabled by default and flows must be enabled manually.
Calling EnableTokenEndpoint()
and AllowPasswordFlow()
should be enough:
services.AddOpenIddict<ApplicationUser, ApplicationRole, ApplicationDbContext>()
.DisableHttpsRequirement()
.EnableTokenEndpoint("/connect/token")
.AllowPasswordFlow()
.UseJsonWebTokens();
yeah that was it :) thanks will make a PR if possible
In the meantime, maybe you should leave this ticket open to make it more visible?
ok, good idea
You have also to AllowRefreshTokenFlow(), otherwise you will get : "The 'offline_access' scope is not allowed."
services.AddOpenIddict<ApplicationUser, ApplicationRole, ApplicationDbContext>()
.DisableHttpsRequirement()
.EnableTokenEndpoint("/connect/token")
.AllowPasswordFlow()
.AllowRefreshTokenFlow()
.UseJsonWebTokens();
I've just added it to the PR, thanks
got this error with newest bits (visual studio update 3 including a kb patch from today) on a fresh git clone: