| 16 | const expires = moment().add(1, "month").toDate(); |
| 17 | |
| 18 | function authenticatePage() { |
| 19 | if (window.location.pathname === "/login") { |
| 20 | return false; |
| 21 | } else if (window.location.pathname === "/signup") { |
| 22 | return false; |
| 23 | } else if (window.location.pathname.indexOf("/b/") > -1) { |
| 24 | return false; |
| 25 | } else if (window.location.pathname === "/passwordReset") { |
| 26 | return false; |
| 27 | } else if (window.location.pathname === "/invite") { |
| 28 | return false; |
| 29 | } else if (window.location.pathname === "/feedback") { |
| 30 | return false; |
| 31 | } else if (window.location.pathname.indexOf("embedded") > -1) { |
| 32 | return false; |
| 33 | } |
| 34 | |
| 35 | window.location.pathname = "/login"; |
| 36 | return true; |
| 37 | } |
| 38 | |
| 39 | function redirectToDashboard() { |
| 40 | if (window.location.pathname === "/login" || window.location.pathname === "signup") { |