How to add redirect uri as localhost in Stripe apps? - Stack Overflow

I have a Stripe app with an OAuth flow, now if you see this Stripe documentation: . It mentions "I

I have a Stripe app with an OAuth flow, now if you see this Stripe documentation: . It mentions "If you use the Test mode link, you can set redirect_uri to localhost.

So that's what I did this is my stripe test mode link: *A*****cF****j*****YZg/authorize?client_id=ca_****************Gbs&redirect_uri=http://localhost:3000/api/stripe/install

Now the problem is it gives below error:

You will ask if you have added that localhost URL to Stripe manifest.json file, Yes I have tried to add it, but when I try to publish that app it gives me this error:

invalid stripe-app.json:
[
 {
  "uri": "http://localhost:3000/api/stripe/install",
  "errors": [
   "expect valid HTTPS URI. got http://localhost:3000/api/stripe/install"
  ]
 }
]

On the other hand, I have added it to the onboarding options:

I have a Stripe app with an OAuth flow, now if you see this Stripe documentation: https://docs.stripe/connect/testing#using-oauth. It mentions "If you use the Test mode link, you can set redirect_uri to localhost.

So that's what I did this is my stripe test mode link: https://marketplace.stripe/oauth/v2/channellink*A*****cF****j*****YZg/authorize?client_id=ca_****************Gbs&redirect_uri=http://localhost:3000/api/stripe/install

Now the problem is it gives below error:

You will ask if you have added that localhost URL to Stripe manifest.json file, Yes I have tried to add it, but when I try to publish that app it gives me this error:

invalid stripe-app.json:
[
 {
  "uri": "http://localhost:3000/api/stripe/install",
  "errors": [
   "expect valid HTTPS URI. got http://localhost:3000/api/stripe/install"
  ]
 }
]

On the other hand, I have added it to the onboarding options: https://dashboard.stripe/test/settings/connect/onboarding-options/oauth

Share Improve this question edited Jan 29 at 19:15 Visrut asked Jan 29 at 19:03 VisrutVisrut 6811 gold badge8 silver badges32 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

Those docs about OAuth are not applicable to Stripe Apps, only Connect platforms (and are no longer a recommended integration pattern).

The OAuth docs for Stripe Apps do not discuss using localhost as this is not really applicable. Installing the app via OAuth, even in test mode, must be handle via a public redirect URI.

https://docs.stripe/stripe-apps/api-authentication/oauth#create-install-link

When developing the app, OAuth is not used. Instead, you enable the App on your own account via preview using the CLI.

https://docs.stripe/stripe-apps/create-app#preview-app

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745282924a4620385.html

相关推荐

  • How to add redirect uri as localhost in Stripe apps? - Stack Overflow

    I have a Stripe app with an OAuth flow, now if you see this Stripe documentation: . It mentions "I

    16小时前
    20

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信