mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Fixed the undefined private key issue
This commit is contained in:
@@ -3,7 +3,7 @@ interface Props {
|
|||||||
encryptedPrivateKey: string;
|
encryptedPrivateKey: string;
|
||||||
iv: string;
|
iv: string;
|
||||||
tag: string;
|
tag: string;
|
||||||
privateTag: string;
|
privateKey: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const saveTokenToLocalStorage = ({
|
export const saveTokenToLocalStorage = ({
|
||||||
@@ -11,14 +11,14 @@ export const saveTokenToLocalStorage = ({
|
|||||||
encryptedPrivateKey,
|
encryptedPrivateKey,
|
||||||
iv,
|
iv,
|
||||||
tag,
|
tag,
|
||||||
privateTag,
|
privateKey,
|
||||||
}: Props) => {
|
}: Props) => {
|
||||||
try {
|
try {
|
||||||
localStorage.setItem("publicKey", publicKey);
|
localStorage.setItem("publicKey", publicKey);
|
||||||
localStorage.setItem("encryptedPrivateKey", encryptedPrivateKey);
|
localStorage.setItem("encryptedPrivateKey", encryptedPrivateKey);
|
||||||
localStorage.setItem("iv", iv);
|
localStorage.setItem("iv", iv);
|
||||||
localStorage.setItem("tag", tag);
|
localStorage.setItem("tag", tag);
|
||||||
localStorage.setItem("PRIVATE_KEY", privateTag);
|
localStorage.setItem("PRIVATE_KEY", privateKey);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
if (err instanceof Error) {
|
if (err instanceof Error) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
|
|||||||
Reference in New Issue
Block a user