Commit d83df730 authored by Ray Schamp's avatar Ray Schamp

Redirect students that must reset their password

Fixes LLK/scratchr2#3878
parent 401edb35
...@@ -79,6 +79,11 @@ module.exports.refreshSession = function () { ...@@ -79,6 +79,11 @@ module.exports.refreshSession = function () {
body.flags.must_complete_registration && body.flags.must_complete_registration &&
window.location.pathname !== '/classes/complete_registration') { window.location.pathname !== '/classes/complete_registration') {
return window.location = '/classes/complete_registration'; return window.location = '/classes/complete_registration';
} else if (
body.flags &&
body.flags.must_reset_password &&
window.location.pathname !== '/classes/student_password_reset/') {
return window.location = '/classes/student_password_reset/';
} else { } else {
dispatch(tokenActions.getToken()); dispatch(tokenActions.getToken());
dispatch(module.exports.setSession(body)); dispatch(module.exports.setSession(body));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment