From a3fa89dd1cd0230f20361e2a6c715c924ae80541 Mon Sep 17 00:00:00 2001 From: Dom Holmes Date: Wed, 26 Mar 2014 17:54:03 +0000 Subject: [PATCH] Fixing issue with missing forgery tokens Fixed the issue where opening the page with an existing asp.net auth cookie (i.e being signed in) wouldn't pass the anti-forgery token on save calls --- Web/Squirrel/Scripts/viewmodels/authViewModel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Web/Squirrel/Scripts/viewmodels/authViewModel.js b/Web/Squirrel/Scripts/viewmodels/authViewModel.js index 3a129b4..1301d59 100644 --- a/Web/Squirrel/Scripts/viewmodels/authViewModel.js +++ b/Web/Squirrel/Scripts/viewmodels/authViewModel.js @@ -106,11 +106,11 @@ appendGpSignInScript(options); + antiForgeryToken.subscribe(antiForgeryTokenChange); antiForgeryToken(options.antiForgeryToken) - isSignedIn(options.user.isAuthenticated); + isSignedIn(options.user.isAuthenticated); isSignedIn.subscribe(isSignedInChange); - antiForgeryToken.subscribe(antiForgeryTokenChange); } function signIn() {