From 9cb9177accbbf6e4397cc71bc06dff0ccd47f441 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 9 Nov 2015 01:48:51 -0500 Subject: login view --- StoneIsland/www/js/sdk/auth.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'StoneIsland/www/js/sdk/auth.js') diff --git a/StoneIsland/www/js/sdk/auth.js b/StoneIsland/www/js/sdk/auth.js index cea0054c..53ac310f 100644 --- a/StoneIsland/www/js/sdk/auth.js +++ b/StoneIsland/www/js/sdk/auth.js @@ -28,6 +28,13 @@ var auth = (function(){ auth.get_user = function(cb){ // fetch user data } + auth.log_out = function(){ + auth.user_id = -1 + auth.access_token = "" + } + auth.logged_in = function(){ + return (auth.user_id !== -1) + } return auth })() -- cgit v1.2.3-70-g09d2