如何阻止重定向URL被Shopify CLI擦拭?
我正在构建一个Shopify应用程序,每次重新启动服务器时,我将其白色列出的OAuth回调URL都会在Shopify的合作伙伴仪表板中删除。
开箱即用,Shopify带有3个OAuth URL:
https://6d57-64-183-178-66.ngrok.io/auth/callback
https://6d57-64-183-178-66.ngrok.io/auth/shopify/callback
https://6d57-64-183-178-66.ngrok.io/api/auth/callback
我需要为我的用例添加第四个网址:
https://6d57-64-183-178-66.ngrok.io/api/auth/callback/offline
在服务器重新启动时,Ngrok URL更新,这很方便,但是,我的URL被删除了,这并不方便。
因此,例如,上面的示例将成为服务器重新启动的下面示例:
https://new-URL.ngrok.io/auth/callback
https://new-URL.ngrok.io/auth/shopify/callback
https://new-URL.ngrok.io/api/auth/callback
我使用Shopify CLI脚手架脚手架,并一直在浏览代码库以查找白色列出的URL更新的位置。但是,我无法追踪发生这种情况的地方。
关于如何阻止白名单的URL被删除每个服务器重置的任何见解?
I'm building a Shopify app and everytime I restart my server, the Oauth callback URL that I whitelisted gets removed in Shopify's partner dashboard.
Out of the box, Shopify comes with 3 Oauth URLs:
https://6d57-64-183-178-66.ngrok.io/auth/callback
https://6d57-64-183-178-66.ngrok.io/auth/shopify/callback
https://6d57-64-183-178-66.ngrok.io/api/auth/callback
I needed to add a fourth for my use case:
https://6d57-64-183-178-66.ngrok.io/api/auth/callback/offline
On server restart, the Ngrok URL gets updated which is convenient, however, my URL gets deleted which is not convenient.
So for example, the above example would become the below example on server restart:
https://new-URL.ngrok.io/auth/callback
https://new-URL.ngrok.io/auth/shopify/callback
https://new-URL.ngrok.io/api/auth/callback
I used the Shopify CLI to scaffold this project and have been looking through the codebase to find where the whitelisted urls get updated. However, I have not been able to track down where this is occuring.
Any insights into how I can stop my whitelisted URL from being deleted every server reset?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果我了解您使用
Shopify App服务
运行您的应用程序,那么您可以做的就是运行
Shopify App Tunnel start
这只会创建隧道并设置白名单。然后,要运行您的应用程序,您可以运行
npm运行服务
(或npm Run dev
)If I understand you run your application with
shopify app serve
Instead, what you can do is run
shopify app tunnel start
This will just create the tunnel and set the whitelists.Then to run your app you can run
npm run serve
(ornpm run dev
)