64 lines
1.6 KiB
TypeScript
64 lines
1.6 KiB
TypeScript
// Metro module 12799 (f12800).
|
|
import { setToken } from "../_bundle/setSecondaryToken";
|
|
import Module12 from "../_bundle/Module12";
|
|
import Module589 from "../_bundle/Module589";
|
|
import Dispatcher from "../Dispatcher";
|
|
let c8826_3 = false;
|
|
let codes = [];
|
|
const key = "";
|
|
let c8826_6 = false;
|
|
let nonces = {
|
|
viewNonce: "",
|
|
regenerateNonce: ""
|
|
};
|
|
class MFAStore extends Module589.Store {
|
|
static displayName = "MFAStore";
|
|
getVerificationKey() {
|
|
return key;
|
|
}
|
|
getBackupCodes() {
|
|
return codes;
|
|
}
|
|
get togglingSMS() {
|
|
return c8826_3;
|
|
}
|
|
getNonces() {
|
|
return nonces;
|
|
}
|
|
get hasSeenBackupPrompt() {
|
|
return c8826_6;
|
|
}
|
|
}
|
|
const mFAStore = new MFAStore(Dispatcher, {
|
|
MFA_ENABLE_SUCCESS: function handleEnableSuccess({ token, codes: codes2 }) {
|
|
if (token !== void 0) {
|
|
setToken(token);
|
|
}
|
|
codes = codes2;
|
|
},
|
|
MFA_DISABLE_SUCCESS: function handleDisableSuccess(a0) {
|
|
setToken(a0.token);
|
|
},
|
|
MFA_SMS_TOGGLE: function handleSMSToggle() {
|
|
c8826_3 = true;
|
|
},
|
|
MFA_SMS_TOGGLE_COMPLETE: function handleSMSToggleComplete() {
|
|
c8826_3 = false;
|
|
},
|
|
MFA_CLEAR_BACKUP_CODES: function handleClearBackupCodes() {
|
|
codes = [];
|
|
},
|
|
MFA_VIEW_BACKUP_CODES: function handleGetBackupCodes({ codes: codes2, key: key2 }) {
|
|
codes = Module12.sortBy(codes2, "code");
|
|
key = key2;
|
|
},
|
|
MFA_SEND_VERIFICATION_KEY: function handleSendVerificationEmail(a0) {
|
|
nonces = a0.nonces;
|
|
},
|
|
MFA_SEEN_BACKUP_CODE_PROMPT: function handleSeenBackupPrompt() {
|
|
c8826_6 = true;
|
|
},
|
|
CONNECTION_OPEN: () => {}
|
|
});
|
|
export default mFAStore;
|