servlet url 作为 strava 授权回调域无效
servlet url is not valid as strava authorization callback domain
我正在尝试使用 Oauth2 连接到 strava api,我的应用程序注册需要授权回调域,例如:http://testapp.com
但是我在本地测试这个,我的 url 就像:http://localhost:/7001/testapp.com/servlet 但是 strava 不会验证这个错误 "this filed must be a domain, no slashes or paths",我怎么能把我的 servlet url 作为一个回调?
将您的授权回调域设置为 http://localhost
或 http://127.0.0.1
。然后在请求访问时,您向 Strava 提供任何以您的回调域开头的 redirect_uri
。例如,
https://www.strava.com/oauth/authorize?
client_id=9
&response_type=code
&redirect_uri=http://localhost:7001/testapp.com/servlet
&scope=write
&state=mystate
&approval_prompt=force
如果 Strava 不能很好地使用 hostname:port 格式,您需要将本地应用程序服务器设置为默认端口上的 运行改为 80。
&redirect_uri=http://localhost/testapp.com/servlet
如果您 运行宁 Tomcat,则需要对 {TOMCAT_HOME}/conf/server 进行更改。xml 文件。如果没有,请检查您的 Web 应用程序服务器文档。
我正在尝试使用 Oauth2 连接到 strava api,我的应用程序注册需要授权回调域,例如:http://testapp.com 但是我在本地测试这个,我的 url 就像:http://localhost:/7001/testapp.com/servlet 但是 strava 不会验证这个错误 "this filed must be a domain, no slashes or paths",我怎么能把我的 servlet url 作为一个回调?
将您的授权回调域设置为 http://localhost
或 http://127.0.0.1
。然后在请求访问时,您向 Strava 提供任何以您的回调域开头的 redirect_uri
。例如,
https://www.strava.com/oauth/authorize?
client_id=9
&response_type=code
&redirect_uri=http://localhost:7001/testapp.com/servlet
&scope=write
&state=mystate
&approval_prompt=force
如果 Strava 不能很好地使用 hostname:port 格式,您需要将本地应用程序服务器设置为默认端口上的 运行改为 80。
&redirect_uri=http://localhost/testapp.com/servlet
如果您 运行宁 Tomcat,则需要对 {TOMCAT_HOME}/conf/server 进行更改。xml 文件。如果没有,请检查您的 Web 应用程序服务器文档。