MCPcopy Index your code
hub / github.com/chartbrew/chartbrew / authenticatePage

Function authenticatePage

client/src/actions/user.js:18–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

16const expires = moment().add(1, "month").toDate();
17
18function 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
39function redirectToDashboard() {
40 if (window.location.pathname === "/login" || window.location.pathname === "signup") {

Callers 1

relogFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected