mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 08:24:18 +08:00
FEATURE: Second factor backup
This commit is contained in:

committed by
Joffrey JAFFEUX

parent
c73f98c289
commit
ec3e6a81a4
@ -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"
|
||||
});
|
||||
|
Reference in New Issue
Block a user