diff --git a/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.cs b/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.cs index 8011c28f..493cbc91 100644 --- a/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.cs +++ b/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationHandlers.cs @@ -426,6 +426,14 @@ public static partial class OpenIddictClientWebIntegrationHandlers context.UserinfoEndpoint = context.Registration.ProviderName switch { + // HubSpot doesn't have a static userinfo endpoint but allows retrieving basic information + // by using an access token info endpoint that requires sending the token in the URI path. + Providers.HubSpot when + (context.BackchannelAccessToken ?? context.FrontchannelAccessToken) is { Length: > 0 } token + => OpenIddictHelpers.CreateAbsoluteUri( + left : new Uri("https://api.hubapi.com/oauth/v1/access-tokens", UriKind.Absolute), + right: new Uri(token, UriKind.Relative)), + // SuperOffice doesn't expose a static OpenID Connect userinfo endpoint but offers an API whose // absolute URI needs to be computed based on a special claim returned in the identity token. Providers.SuperOffice when diff --git a/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationProviders.xml b/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationProviders.xml index 3e4b2601..831335d6 100644 --- a/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationProviders.xml +++ b/src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationProviders.xml @@ -308,6 +308,31 @@ Description="The value used as the 'access_type' parameter (can be set to 'offline' to retrieve a refresh token)" /> + + + + + + + + + + + + + + +