@sowell/quasar-app-extension-auth 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -8,10 +8,7 @@
|
|
|
8
8
|
class="q-mb-sm q-mr-md"
|
|
9
9
|
style="width: 190px" />
|
|
10
10
|
</div>
|
|
11
|
-
<div
|
|
12
|
-
class="column justify-center full-height"
|
|
13
|
-
style="max-width: 550px; margin-top: -90px">
|
|
14
|
-
<div></div>
|
|
11
|
+
<div class="column justify-center full-height" style="max-width: 550px">
|
|
15
12
|
<div
|
|
16
13
|
class="text-subtitle1 q-mt-lg"
|
|
17
14
|
style="font-size: 34px; font-weight: 600; line-height: 34px">
|
|
@@ -43,10 +40,11 @@
|
|
|
43
40
|
class="full-width q-mb-md">
|
|
44
41
|
<template #append>
|
|
45
42
|
<q-icon
|
|
46
|
-
:name="
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
43
|
+
:name="
|
|
44
|
+
showPassword
|
|
45
|
+
? icons.ionEyeOffOutline
|
|
46
|
+
: icons.ionEyeOutline
|
|
47
|
+
"
|
|
50
48
|
class="cursor-pointer q-mr-sm"
|
|
51
49
|
@click="showPassword = !showPassword" />
|
|
52
50
|
</template>
|
|
@@ -108,7 +106,7 @@ export default defineComponent({
|
|
|
108
106
|
canSubmit,
|
|
109
107
|
passwordUpdated,
|
|
110
108
|
showPassword,
|
|
111
|
-
icons,
|
|
109
|
+
icons,
|
|
112
110
|
goToLoginPage,
|
|
113
111
|
onSubmit
|
|
114
112
|
}
|
package/src/utils/encryption.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
|
-
import CryptoJS from "crypto-js"
|
|
1
|
+
import CryptoJS from "crypto-js"
|
|
2
2
|
|
|
3
3
|
export function encrypt(password: string): string {
|
|
4
|
-
|
|
4
|
+
const key = process.env.ENCRYPTION_KEY
|
|
5
|
+
if (!key) throw new Error(" is not defined")
|
|
6
|
+
return CryptoJS.AES.encrypt(password, key).toString()
|
|
5
7
|
}
|
|
6
8
|
|
|
7
9
|
export function decrypt(encryptedPassword: string): string {
|
|
8
|
-
|
|
10
|
+
const key = process.env.ENCRYPTION_KEY
|
|
11
|
+
if (!key) throw new Error("ENCRYPTION_KEY is not defined")
|
|
12
|
+
return CryptoJS.AES.decrypt(encryptedPassword, key).toString(
|
|
13
|
+
CryptoJS.enc.Utf8
|
|
14
|
+
)
|
|
9
15
|
}
|