我正在尝试使用DotnetOpenAuth来允许用户通过谷歌登录我的网站。它预装在MVC4网站应用程序项目中。
我的一些用户抱怨说,他们可以通过谷歌OAuth请求成功登录,但当他们尝试从另一台机器(有时是另一种浏览器)登录时,它会将他们视为新用户。它不会将他们登录到他们现有的帐户。
我不确定是否有任何代码片段可以帮助调试这个问题,但整个网站都可以在github上找到:
发布于 2013-05-05 04:20:14
这是对混合了www.domain.com和domain.com的用户所做的。似乎为每个人颁发了不同的令牌?
我现在使用以下重写规则将domain.com路由到www.domain.com
<rewrite>
<rules>
<rule name="Add WWW prefix" >
<match url="(.*)" ignoreCase="true" />
<conditions>
<add input="{HTTP_HOST}" pattern="^domain\.com" />
</conditions>
<action type="Redirect" url="http://www.domain.com/{R:1}" redirectType="Permanent" />
</rule>
</rules>
</rewrite>https://stackoverflow.com/questions/16377462
复制相似问题