Skip to content

Commit

Permalink
debug added logs
Browse files Browse the repository at this point in the history
  • Loading branch information
bhavanakarwade committed Dec 17, 2024
1 parent 7bde9c8 commit edcf97e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/api/Auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,15 +221,17 @@ export const addPasskeyUserDetails = async(payload: AddPassword, email:string) =
}

export const passwordEncryption = (password: string): string => {
const CRYPTO_PRIVATE_KEY: string = process.env.PUBLIC_CRYPTO_PRIVATE_KEY || import.meta.env.PUBLIC_CRYPTO_PRIVATE_KEY;
const CRYPTO_PRIVATE_KEY: string = import.meta.env.PUBLIC_CRYPTO_PRIVATE_KEY;
console.log("🚀 ~ passwordEncryption ~ CRYPTO_PRIVATE_KEY:", CRYPTO_PRIVATE_KEY)
const encryptedPassword: string = CryptoJS.AES.encrypt(JSON.stringify(password), CRYPTO_PRIVATE_KEY).toString()
return encryptedPassword
}

export const encryptData = (value: any): string => {

const CRYPTO_PRIVATE_KEY: string = process.env.PUBLIC_CRYPTO_PRIVATE_KEY || import.meta.env.PUBLIC_CRYPTO_PRIVATE_KEY;
console.log("All env variables:", import.meta.env);

const CRYPTO_PRIVATE_KEY: string = import.meta.env.PUBLIC_CRYPTO_PRIVATE_KEY;
console.log("🚀 ~ encryptData ~ CRYPTO_PRIVATE_KEY:", CRYPTO_PRIVATE_KEY)

try {
Expand All @@ -245,7 +247,7 @@ export const encryptData = (value: any): string => {
}

export const decryptData = (value: any): string => {
const CRYPTO_PRIVATE_KEY: string = process.env.PUBLIC_CRYPTO_PRIVATE_KEY || import.meta.env.PUBLIC_CRYPTO_PRIVATE_KEY;
const CRYPTO_PRIVATE_KEY: string = import.meta.env.PUBLIC_CRYPTO_PRIVATE_KEY;
console.log("🚀 ~ decryptData ~ CRYPTO_PRIVATE_KEY:", CRYPTO_PRIVATE_KEY)

try {
Expand Down

0 comments on commit edcf97e

Please sign in to comment.