2013-05-04 43 views
0

我試圖使用DotnetOpenAuth來允許用戶通過Google登錄到我的網站。這是預先安裝MVC 4網站應用程序項目。.Net MVC 4 Google OAuth帳戶協會

我的一些用戶抱怨他們可以通過Google OAuth請求成功登錄,但是當他們嘗試從另一臺機器(或有時在另一臺瀏覽器中)時,它會將其視爲新用戶。它不會將它們記錄到其現有帳戶中。

我不知道,如果任何代碼段將幫助調試的問題,而是整個網站可以在GitHub上:

MVC Site Code

回答

0

這是做給用戶混合www.domain.com VS域.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>