FEATURE: Second factor backup

This commit is contained in:
Maja Komel
2018-06-28 10:12:32 +02:00
committed by Joffrey JAFFEUX
parent c73f98c289
commit ec3e6a81a4
51 changed files with 1148 additions and 153 deletions

View File

@ -252,13 +252,14 @@ export default function() {
}
if (data.password === "need-second-factor") {
if (data.second_factor_token) {
if (data.second_factor_token && data.second_factor_token === "123456") {
return response({ username: "eviltrout" });
}
return response({
error: "Invalid Second Factor",
reason: "invalid_second_factor",
backup_enabled: true,
sent_to_email: "eviltrout@example.com",
current_email: "current@example.com"
});