Support functions for provider.auth
and provider.token
#461
Labels
feature
New functionality or improvement
provider.auth
and provider.token
#461
Support plan
Context
@hapi/hapi@latest
What problem are you trying to solve?
I'm attempting to use this module in a Shopify app that integrates with Shopify's OAuth2 authentication workflow.
Shopify works slightly differently from the current providers in that the authorization step is per store, such that the
provider.auth
andprovider.token
options differ depending on the store that initiated the OAuth flow (AKA the store that installed the "app").In other words, in order for "Store A" authenticate it must redirect to
https://store-a.myshopify.com/admin/oauth/authorize
, while a "Store B" must redirect tohttps://store-b.myshopify.com/admin/oauth/authorize
.Do you have a new or modified API suggestion to solve the problem?
As far as I can tell,
@shopify/koa-shopify-auth
is able to determine which store to redirect to through a query parameter in the request. I think a similar approach could be taken here.Would you support expanding the
provider
schema so thatauth
andtoken
options can alternatively accept functions with access torequest
, similar to theproviderParams
orscope
options (#233)?Thanks!
The text was updated successfully, but these errors were encountered: