Access using https redirect-url is denied at Square Connect Authorize

心已入冬 提交于 2019-12-12 05:28:54

问题


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

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. Details for https redirect-url (Failed)
    SSL is self-signed certificate, redirect url is https://{MY_SERVER}/callback, and iptables is stopped.

    • Request
      https://squareup.com/oauth2/authorize?client_id={MY_APPLICATION_ID}&response_type=code&session=false&state=test
    • Callback
      https://{MY_SERVER}/callback?state=test&error=access_denied&error_description=Authorization+not+allowed&response_type=code
  2. Details for http redirect-url (Success)
    Redirect url is http://localhost/callback.

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

Any help would be greatly appreciated!


回答1:


I am one of the developers of Square Connect.

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.



来源:https://stackoverflow.com/questions/22006099/access-using-https-redirect-url-is-denied-at-square-connect-authorize

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!