Indicate which access flow was used
parent
2bdc16b4bd
commit
d66dbdea61
|
@ -63,11 +63,14 @@ export const getSecretStorageKey = async ({ keys: keyInfos }) => {
|
|||
throw new Error("Secret storage access canceled");
|
||||
}
|
||||
let key;
|
||||
const { passphrase } = info;
|
||||
if (passphrase) {
|
||||
key = await deriveKey(input, passphrase.salt, passphrase.iterations);
|
||||
if (input.passphrase) {
|
||||
key = await deriveKey(
|
||||
input.passphrase,
|
||||
info.passphrase.salt,
|
||||
info.passphrase.iterations,
|
||||
);
|
||||
} else {
|
||||
key = decodeRecoveryKey(input);
|
||||
key = decodeRecoveryKey(input.recoveryKey);
|
||||
}
|
||||
// Save to cache to avoid future prompts in the current session
|
||||
secretStorageKeys[name] = key;
|
||||
|
|
|
@ -65,11 +65,11 @@ export default class AccessSecretStorageDialog extends React.PureComponent {
|
|||
}
|
||||
|
||||
_onPassPhraseNext = async () => {
|
||||
this.props.onFinished(this.state.passPhrase);
|
||||
this.props.onFinished({ passphrase: this.state.passPhrase });
|
||||
}
|
||||
|
||||
_onRecoveryKeyNext = async () => {
|
||||
this.props.onFinished(this.state.recoveryKey);
|
||||
this.props.onFinished({ recoveryKey: this.state.recoveryKey });
|
||||
}
|
||||
|
||||
_onPassPhraseChange = (e) => {
|
||||
|
|
Loading…
Reference in New Issue