New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the ability to specify the host of the redirect url instead of ctx.host #5
Comments
This was taking me too long looking for a workaround trying to use koa-proxies and stuff like that. Have added a PR which solves this issue, if you could review #6 |
So I was making a few minor changes to your PR, when I had the idea that instead of using |
Also, have you tried initializing your Koa server like this:
I had to do this for ngrok and heroku so I could get the client's IP address correctly, so maybe it's a similar situation with getting the host header. |
That's a good idea. Yeah, I am passing that same string as pulled from the .env so that should work in my case. createShopifyAuth({
accessMode: "online",
authPath: "/auth",
host: config.shopify.HOST_NAME, |
I have not, but we've just resubmitted the app for listing after using the forked version of this package, so just going to wait on a reply from Shopify now before making more changes. |
I just published the new package v1.0.5, so I'll go ahead and close this. The new version uses |
I'm having the same issue as this person here on the original koa-shopify-auth and so am suggesting the exact same thing: Shopify/koa-shopify-auth#11
Overview
The developer should be able to define the host of the redirect URL to be https://{Host} instead of taking the host from context (ctx).
simple-koa-shopify-auth/src/top-level-oauth-redirect.ts
Line 36 in e113d01
When running createShopifyAuth() there could be an extra optional parameter, host, which if set the above function will use the provided host instead of ctx.host, which can be wrong when using proxies.
The text was updated successfully, but these errors were encountered: