Closed microfly2008 closed 12 months ago
It's not a bug: the Shopify provider requires that the shop name be dynamically set via AuthenticationProperties
. Concretely, this means you can't use the default challenge mechanism and must call IAuthenticationService.ChallengeAsync()
manually with an AuthenticationProperties
instance that requires the mentioned property.
In the general scenario, you have a custom endpoint that is called by Shopify as part of the "installation" process: it's where that endpoint must call ChallengeAsync()
with the shop name resolved from the query string.
See https://shopify.dev/docs/apps/auth/oauth/getting-started for more information.
@kevinchalet Thanks for your help and detailed answer. 👍
For the record, OpenIddict 4.7 (and higher) allows setting a static shop name for scenarios where defining it dynamically is not needed (e.g if you implement employees authentication for your app):
options.UseWebProviders()
.AddShopify(options =>
{
// ...
options.SetShopName("shopname");
});
More info here on how to get started with the OpenIddict web providers: https://kevinchalet.com/2022/12/16/getting-started-with-the-openiddict-web-providers/
Describe the bug
Hello, I try to use Shopify provider in ABP AuthServer(Identity Server 4), but it throws the follow exception:
InvalidOperationException: Shopify provider AuthenticationProperties must contain ShopNameAuthenticationProperty.
Is there a way to add AuthenticationProperties like ShopNameAuthenticationProperty? There is no relative document or sample code for Shopify provider.
Reproduce the problem
System information
Exception Stack