0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-13 17:22:49 +00:00

Local login now working great

This commit is contained in:
Scott Tolksdorf
2017-01-09 17:47:48 -05:00
parent baaa82ed34
commit 07f249b23e
3 changed files with 2 additions and 8 deletions

View File

@@ -5,9 +5,7 @@ const Actions = {
Store.init(initState);
},
login : ()=>{
console.log('login');
//redirect to the login path and add the redirect
window.location = Store.getLoginPath();
},
logout : ()=>{
document.cookie = 'nc_session=;expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/;domain=.naturalcrit.com';

View File

@@ -17,6 +17,7 @@ Store.getLoginPath = ()=>{
let path = State.loginPath;
if(typeof window !== 'undefined'){
console.log('yo here');
path = `${path}?redirect=${encodeURIComponent(window.location.href)}`;
}
return path;
};