Basic MVC authentication fails

Aug 30, 2010 at 9:12 PM

Hi there,

I am attempting a very basic MVC application with the following code in the HomeController:

    [HandleError]
    public class HomeController : Controller
    {
        
        [FacebookAuthorization(IsFbml = false)]
        public ActionResult Index()
        {
            return View("Index");
        }

        [FacebookAuthorization(IsFbml = false)]
        public ActionResult Test()
        {
            return View("Index");
        }

    }

As you can see, I have the exact same code in both the Index() and the Test() method.

When I browse to http://localhost:50833/, the Index() method fires, I get directed to Facebook for login, and I thereafter come back to the Index() method and the view is display. So this works fine. However, when I thereafter browse to http://localhost:50833/Home/Test, I expect the View to display directly as I have already logged in, but again I instead get redirected to Facebook to login and thereafter come back to the Index() method.

Am I missing something here? Do I need to store the first successful authentication in some cookie/session variable?

I have tried this with both the 3.0.1 and the 3.1 beta version of the tookit

Thank you in advance for your help!

// Peter Larsson