简体   繁体   English

Instagram OAuth 2.0授权(注册重定向URI)。 我是否也应该注册WWW。*版本的URI?

[英]Instagram OAuth 2.0 authorize (register redirect URI). Should I register WWW.* version of URI also?

I have a Web application which uses authorization via different social network account (ieInstagram). 我有一个Web应用程序,它通过不同的社交网络帐户(即Instagram)使用授权。 I created my account in Instagram, registered my Website URI (ie MyApplication.com) and stored secret tokens in .config file. 我在Instagram中创建了帐户,注册了网站URI(即MyApplication.com),并将秘密令牌存储在.config文件中。 Every time user logs in I use these tokens. 每次用户登录时,我都会使用这些令牌。 Everything works fine until user visited www.MyApplication.com. 一切正常,直到用户访问了www.MyApplication.com。

According to Instagram developers API page www.MyApplication.com and MyApplication.com are different sites. 根据Instagram开发人员的API页面www.MyApplication.comMyApplication.com是不同的网站。 Do I have to register WWW version of my site? 我必须注册网站的WWW版本吗? This requires to use another token pair. 这需要使用另一个令牌对。 Thus, I have to check user authorization request twice!!! 因此,我必须检查用户授权请求两次!!! But it's not a normal solution. 但这不是正常的解决方案。

Any ideas to do that much clear? 有什么想法可以做得那么清楚吗?

www.MyApplication.com and MyApplication.com are different. www.MyApplication.comMyApplication.com是不同的。
More or less the www. 或多或少的www. is just a convention. 只是一个惯例。

It's a subdomain just like app.MyApplication.com , images.Myapplication.com ect. 就像app.MyApplication.comimages.Myapplication.com等一样,这是一个子域。

You wouldn't register both of them. 您不会同时注册它们。 Instead you would set up on your sever to either redirect www.MyApplication.com to MyApplication.com , or the other way around, and redirect MyApplication.com to www.MyApplication.com . 取而代之的是,您将设置服务器以将www.MyApplication.com重定向到MyApplication.com或以其他方式将MyApplication.com重定向到www.MyApplication.com

This way you only have to deal with one of them. 这样,您只需要处理其中之一。 In your case it sounds like you'd just want to redirect everything with www. 在您的情况下,听起来您只想使用www.重定向所有内容www. to just the regular domain name. 改为常规域名。

If you're interested in the debates between www. 如果您对www之间的辩论感兴趣。 or not. 或不。

http://no-www.org/ http://no-www.org/

http://www.yes-www.org/ http://www.yes-www.org/

There is an easy way to handle this your web.config. 有一个简单的方法可以处理您的web.config。 Mads Kristensen has it covered pretty well here. Mads Kristensen在这里的报道非常好。

http://madskristensen.net/post/url-rewrite-and-the-www-subdomain http://madskristensen.net/post/url-rewrite-and-the-www-subdomain

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Uri.TryCreate错误上的“ http:// www。”? - “http://www.” on Uri.TryCreate bug? 如果我在 Unity (OAuth 2.0) 中有 android 应用程序,redirect_uri 是什么? - What is the redirect_uri if I have android app in Unity (OAuth 2.0)? Google Oauth 2.0 redirect_uri_mismatch-回调端口已更改 - Google Oauth 2.0 redirect_uri_mismatch - Port changed on callback 如何重定向到https并添加www。 在链接前面 - How to redirect to https and also add www. in front of the link 在OSX上将Mono应用程序注册到Uri方案 - Register a Mono application to an Uri scheme on OSX 如何在 google OAuth 2.0 的重定向 uri 中配置通配符或自定义域 - How to configure wild card or custom domains in redirect uri in google OAuth 2.0 Google api OAuth 因重定向 uri 不匹配而失败 - Google api OAuth fails with redirect uri mismatch 如何让json回复谷歌oauth中的令牌详细信息回到我的应用程序。 什么应该重定向uri? - how to get json reply with token details in google oauth back to my app. What should be the redirect uri? 请求中的重定向URI:http:// localhost:12349 / authorize /与注册的重定向URI不匹配 - The redirect URI in the request: http://localhost:12349/authorize/ did not match a registered redirect URI 我可以在Open Rasta中使用一个处理程序和一个URI注册多个资源吗? - Can I register multiple resources with one handler and one URI in Open Rasta?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM