[英]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.com和MyApplication.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.com
和MyApplication.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.com
, images.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.