Square Connect 授权拒绝使用 https 重定向 url 访问 [英] Access using https redirect-url is denied at Square Connect Authorize

查看:71
本文介绍了Square Connect 授权拒绝使用 https 重定向 url 访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Square Connect,但在使用 OAuth API 时遇到问题.(Square Connect OAuth API)

I am using Square Connect and have a trouble using OAuth API. (Square Connect OAuth API)

当我在应用程序页面设置 https 重定向 URL 时,端点给我一个错误响应而不显示登录页面.如果我发送相同的请求设置 localhost (http),它工作正常.为什么我的访问被拒绝?我需要为 https 重定向 url 做任何额外的事情吗?

When I set a https redirect-url at the apps page, the endpoint gives me an error response without showing a sign-in page. If I send the same request setting localhost (http), it works fine. Why do I get access-denied? Is there any extra things I need to do for https redirect-url?

  1. https 重定向网址的详细信息(失败)
    SSL为自签名证书,重定向url为https://{MY_SERVER}/callback,iptables停止.

  1. Details for https redirect-url (Failed)
    SSL is self-signed certificate, redirect url is https://{MY_SERVER}/callback, and iptables is stopped.

  • 请求
    https://squareup.com/oauth2/authorize?client_id={MY_APPLICATION_ID}&response_type=code&session=false&state=test
  • 回调
    https://{MY_SERVER}/callback?state=test&error=access_denied&error_description=Authorization+not+allowed&response_type=code

http 重定向 URL(成功)的详细信息
重定向 url 是 http://localhost/callback.

  • 请求
    https://squareup.com/oauth2/authorize?client_id={MY_APPLICATION_ID}&response_type=code&session=false&state=test
  • 回调
    http://localhost/callback?state=test&code={MY_CODE}&response_type=code

任何帮助将不胜感激!

推荐答案

我是 Square Connect 的开发者之一.

I am one of the developers of Square Connect.

默认情况下,应用程序的 OAuth 流程是禁用的,这就是您看到不允许授权"失败的原因.如果您希望为您的应用程序启用 OAuth 流程,那么您需要联系 Square.

By default the OAuth flow is disabled for applications which is why you are seeing the "Authorization not allowed" failure. If you wish to enable OAuth flow for your application then you need to contact Square.

这篇关于Square Connect 授权拒绝使用 https 重定向 url 访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆