IdentityServer4 icon indicating copy to clipboard operation
IdentityServer4 copied to clipboard

The "offline_access" scope is always shown in the discovery document

Open alexnovokshanov opened this issue 4 years ago • 0 comments

The IdentityServer4.ResponseHandling.DiscoveryResponseGenerator does not honor IdentityServer4.Models.Resources.OfflineAccess property value and always adds "offline_access" to the scopes list (https://github.com/IdentityServer/IdentityServer4/blob/main/src/IdentityServer4/src/ResponseHandling/Default/DiscoveryResponseGenerator.cs, line 233). Thus the offline access is always advertised in the discovery document.

The code at line 233 should be:

if (resources.OfflineAccess) { scopes.Add(IdentityServerConstants.StandardScopes.OfflineAccess); }

alexnovokshanov avatar Jul 28 '21 00:07 alexnovokshanov