-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/19496 2fa steps refactor #23060
Fix/19496 2fa steps refactor #23060
Changes from 6 commits
498d5c7
24e914a
5baaf08
7a9162a
2478625
9b6f5dd
e5b0cc0
caab005
8c63763
357b6b5
431c979
f2bfffa
e3655df
becc443
48da39d
27ac425
dbfec6e
57dd06b
cfd4f62
5a4f42d
a95d9a7
ae18cec
49ab183
191b0c3
73bd246
772580a
abdd224
e522841
1162131
b674139
591c666
065503a
2cebedb
d69dd90
660aa2a
30ca6de
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2536,6 +2536,13 @@ const CONST = { | |
TRANSLATION_KEYS: { | ||
ATTACHMENT: 'common.attachment', | ||
}, | ||
TWO_FACTOR_AUTH_STEPS: { | ||
CODES: 'CODES', | ||
VERIFY: 'VERIFY', | ||
SUCCESS: 'SUCCESS', | ||
IS_ENABLED: 'IS_ENABLED', | ||
DISABLE: 'DISABLE', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And then change this to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @aimane-chnaif Should I also change the components' (steps) names? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes to be consistent |
||
} | ||
}; | ||
|
||
export default CONST; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,26 @@ | ||
import Onyx from 'react-native-onyx'; | ||
import ONYXKEYS from '../../ONYXKEYS'; | ||
import Navigation from "../Navigation/Navigation"; | ||
import ROUTES from "../../ROUTES"; | ||
|
||
/** | ||
* Clear 2FA data if the flow is interrupted without finishing | ||
*/ | ||
function clearTwoFactorAuthData() { | ||
Onyx.merge(ONYXKEYS.ACCOUNT, {recoveryCodes: '', twoFactorAuthSecretKey: ''}); | ||
Onyx.merge(ONYXKEYS.ACCOUNT, {recoveryCodes: '', twoFactorAuthSecretKey: '', twoFactorAuthStep: ''}); | ||
} | ||
|
||
function setTwoFactorAuthStep(twoFactorAuthStep) { | ||
Onyx.merge(ONYXKEYS.ACCOUNT, {twoFactorAuthStep}); | ||
} | ||
|
||
function quitAndNavigateBackToSettings() { | ||
clearTwoFactorAuthData(); | ||
Navigation.goBack(ROUTES.SETTINGS_SECURITY); | ||
} | ||
|
||
export { | ||
// eslint-disable-next-line import/prefer-default-export | ||
clearTwoFactorAuthData, | ||
setTwoFactorAuthStep, | ||
quitAndNavigateBackToSettings, | ||
}; |
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there reason why this name cannot just be
ENABLED
?