diff --git a/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.Discovery.cs b/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.Discovery.cs index 6c9de21f..1627e5cb 100644 --- a/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.Discovery.cs +++ b/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.Discovery.cs @@ -110,6 +110,11 @@ public static partial class OpenIddictClientWebIntegrationHandlers context.Configuration.GrantTypesSupported.Add(GrantTypes.Implicit); } + else if (context.Registration.ProviderName is Providers.Slack) + { + context.Configuration.GrantTypesSupported.Add(GrantTypes.RefreshToken); + } + return default; } } diff --git a/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.cs b/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.cs index dd830fd0..4bc71604 100644 --- a/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.cs +++ b/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.cs @@ -710,6 +710,14 @@ public static partial class OpenIddictClientWebIntegrationHandlers context.Request["duration"] = options.Duration; } + // Slack allows sending an optional "team" parameter to simplify the login process. + else if (context.Registration.ProviderName is Providers.Slack) + { + var options = context.Registration.GetSlackOptions(); + + context.Request["team"] = options.Team; + } + return default; } } diff --git a/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationProviders.xml b/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationProviders.xml index 764c7a98..61a5001f 100644 --- a/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationProviders.xml +++ b/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationProviders.xml @@ -345,6 +345,21 @@ Description="The value used as the 'duration' parameter (can be set to 'permanent' to retrieve a refresh token)" /> + + + + + + + +