Note that there are some explanatory texts on larger screens.

plurals
  1. POFacebook Authentication and strange redirect behaviour
    primarykey
    data
    text
    <p>I'm currently testing an OAuth implementation of facebook connect using <a href="http://facebooksdk.codeplex.com" rel="noreferrer">http://facebooksdk.codeplex.com</a>.</p> <p>I've got a FacebookController with 2 simple actions called <strong>LogOn</strong> and <strong>CallBack</strong>.</p> <p>Everything works fine and the user is logged correctly into my system.</p> <p>The problem is when the CallBack action is called, something strange happens that makes a simple</p> <pre><code>return Redirect(loggedUrl); </code></pre> <p>redirecting to the correct logged url but ending with the following characters: <code>#_=_</code></p> <p>It appears that the Facebook server sends the information to my webserver using the following HTTP header:</p> <pre><code>HTTP/1.1 302 Found Cache-Control: private, no-cache, no-store, must-revalidate Expires: Sat, 01 Jan 2000 00:00:00 GMT Location: http://mywebsite.com/Facebook/CallBack/?state=1&amp;code=AQCXexr10uxANSBOu9JqrBDxqPkWbsyxM1S9ltuY9XwCXW7eGsOII329SthClxOSM_a7wJvwrXh1_O3D5I7E_nxCDTWDLpyYdMpMUfw4zMWcQ4oV2PmRkIMd2NfPYRKlkLgkurEzka1CjAF1jp8Xb3crklOB59W4IT7LZy6MEmFusuhSKacmsTcV1LAOW4uJ3K4#_=_ P3P: CP="Facebook does not have a P3P policy. Learn why here: http://fb.me/p3p" Pragma: no-cache Set-Cookie: locale=en_US; expires=Fri, 28-Oct-2011 00:09:38 GMT; path=/; domain=.facebook.com Content-Type: text/html; charset=utf-8 X-FB-Server: 10.43.103.61 X-Cnection: close Date: Fri, 21 Oct 2011 00:09:38 GMT Content-Length: 0 </code></pre> <p>As you can see we can find the <code>#_=_</code> characters at the end of the <strong>Location</strong> value.</p> <p>It's like the Redirect was taking into account the <code>#_=_</code> characters by adding them automatically to the loggedUrl.</p> <p>Even when I try with <code>return Redirect("/");</code>, the <code>#_=_</code> is added from (almost) nowhere to my redirected url...</p> <p>Any idea would be really appreciated.</p> <p>Thanks in advance for any answer.</p> <p>Regards,</p> <p>LB</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload