Skip to content
This repository was archived by the owner on Dec 14, 2023. It is now read-only.

Commit 4de2ff8

Browse files
authored
Merge pull request #299 from CoderDojo/cdf-rpi
Adjust logged in cdf guard to direct to rpi if flag on
2 parents c4061e1 + bf8232e commit 4de2ff8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/router/loggedInCDFNavGuard.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ const fn = {
55
if (user && user.login) {
66
return next();
77
}
8-
return window.location.replace(`/cdf/login?referer=${from}`);
8+
const rpiAuthFlag = window.localStorage.getItem('rpiAuth') === 'true';
9+
return window.location.replace(`/${rpiAuthFlag ? 'rpi' : 'cdf'}/login?referer=${from}`);
910
},
1011
};
1112
export default async function (to, from, next) {

0 commit comments

Comments
 (0)