-
Notifications
You must be signed in to change notification settings - Fork 52
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
feat: account recovery #270
Conversation
@quadristan
|
@@ -113,6 +114,11 @@ export const rootCommands = (params: { program: Command }) => { | |||
.description('Backup your local vault (will use the current directory by default)') | |||
.action(runBackup); | |||
|
|||
program | |||
.command('recover-account') | |||
.description('interactively login to an account with a recovery key') |
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.
.description('interactively login to an account with a recovery key') | |
.description('Interactively login to an account with a recovery key') |
} catch (e) { | ||
logger.error('Failed to decrypt MP. Maybe the ARK entered is incorrect'); | ||
throw e; |
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.
} catch (e) { | |
logger.error('Failed to decrypt MP. Maybe the ARK entered is incorrect'); | |
throw e; | |
} catch (error) { | |
logger.error('Failed to decrypt Master Password. Maybe the ARK (Account Recovery Key) entered is incorrect'); | |
throw error; |
import { decryptAesCbcHmac256, getDerivateUsingParametersFromEncryptedData } from '../../crypto/decrypt'; | ||
import { deserializeEncryptedData } from '../../crypto/encryptedDataDeserialization'; | ||
|
||
function cleanArk(input: string): string { |
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.
use arrow function please, here and below
|
||
export const askConfirmShowMp = async () => { | ||
const response = await confirm({ | ||
message: 'Do you want to see the masterpassword that will be unlocked by this recovery key?', |
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.
message: 'Do you want to see the masterpassword that will be unlocked by this recovery key?', | |
message: 'Do you want to see the master password that will be unlocked by this recovery key?', |
This MR brings the functionality of using ARK to log in with the CLI, optionally recovering the MP with a recover-account command
It will allow users who have issue with their ARK to get more information.
User XP: