@sowell/quasar-app-extension-auth 1.1.2 → 1.2.0
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sowell/quasar-app-extension-auth",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "A Quasar app extension to manage Authentication",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"repository": "https://github.com/sowell-ai/quasar.extension.auth",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@quasar/app-webpack": "^4.0.0-beta.16",
|
|
25
25
|
"@quasar/cli": "^2.2.3",
|
|
26
|
+
"@types/crypto-js": "^4.2.2",
|
|
26
27
|
"@types/node": "^16.9.1",
|
|
27
28
|
"@types/validator": "^13.6.3",
|
|
28
29
|
"@typescript-eslint/eslint-plugin": "^5.10.0",
|
|
@@ -162,7 +162,6 @@ import SowellMessage from "../dialogs/Message.vue"
|
|
|
162
162
|
import MicrosoftLogo from "../../assets/logo-microsoft.svg"
|
|
163
163
|
|
|
164
164
|
import { useAuth } from "composables/auth"
|
|
165
|
-
import { send } from "process"
|
|
166
165
|
|
|
167
166
|
export default defineComponent({
|
|
168
167
|
name: "Auth",
|
|
@@ -95,6 +95,41 @@
|
|
|
95
95
|
style="font-size: 14px; cursor: pointer; width: 350px">
|
|
96
96
|
{{ $t("auth.forgottenPassword") }}
|
|
97
97
|
</div>
|
|
98
|
+
<div v-if="USE_SSO">
|
|
99
|
+
<div
|
|
100
|
+
style="
|
|
101
|
+
display: flex;
|
|
102
|
+
justify-content: space-between;
|
|
103
|
+
align-items: center;
|
|
104
|
+
">
|
|
105
|
+
<div
|
|
106
|
+
style="
|
|
107
|
+
width: 35%;
|
|
108
|
+
border: 1px solid #bcc3c7;
|
|
109
|
+
height: 1px;
|
|
110
|
+
"></div>
|
|
111
|
+
<div class="text-weight-bold">{{ $t("common.or") }}</div>
|
|
112
|
+
<div
|
|
113
|
+
style="
|
|
114
|
+
width: 35%;
|
|
115
|
+
border: 1px solid #bcc3c7;
|
|
116
|
+
height: 1px;
|
|
117
|
+
"></div>
|
|
118
|
+
</div>
|
|
119
|
+
<q-btn
|
|
120
|
+
data-cy="submit-sso-login"
|
|
121
|
+
:label="$t('auth.msalLogin')"
|
|
122
|
+
color="primary"
|
|
123
|
+
no-caps
|
|
124
|
+
unelevated
|
|
125
|
+
text-color="black"
|
|
126
|
+
:loading="msalLoading"
|
|
127
|
+
:disable="msalLoading || loading"
|
|
128
|
+
:icon="`img:${MicrosoftLogo}`"
|
|
129
|
+
class="full-width q-mt-lg"
|
|
130
|
+
@click="msalAuth"
|
|
131
|
+
outline />
|
|
132
|
+
</div>
|
|
98
133
|
</div>
|
|
99
134
|
</q-form>
|
|
100
135
|
</div>
|
|
@@ -154,6 +189,7 @@ import SendEmail from "../dialogs/SendEmail.vue"
|
|
|
154
189
|
import SowellMessage from "../dialogs/Message.vue"
|
|
155
190
|
import { useAuth } from "composables/auth"
|
|
156
191
|
import { AxiosError } from "axios"
|
|
192
|
+
import MicrosoftLogo from "../../assets/logo-microsoft.svg"
|
|
157
193
|
|
|
158
194
|
export default defineComponent({
|
|
159
195
|
name: "Auth",
|
|
@@ -175,6 +211,9 @@ export default defineComponent({
|
|
|
175
211
|
APP_SERVER_BASE_URL,
|
|
176
212
|
IS_OTP,
|
|
177
213
|
icons,
|
|
214
|
+
USE_SSO,
|
|
215
|
+
msalAuth,
|
|
216
|
+
msalLoading,
|
|
178
217
|
onSubmit,
|
|
179
218
|
retypeEmail,
|
|
180
219
|
isSubmitBtnDisabled,
|
|
@@ -209,8 +248,7 @@ export default defineComponent({
|
|
|
209
248
|
if ((error as AxiosError).response?.status === 403) {
|
|
210
249
|
// NOTE: 403 is returned when the user is not allowed to reset the password
|
|
211
250
|
sendEmailCode.value = 403
|
|
212
|
-
}
|
|
213
|
-
else {
|
|
251
|
+
} else {
|
|
214
252
|
sendEmailCode.value = 404
|
|
215
253
|
}
|
|
216
254
|
isReset.value = true
|
|
@@ -239,6 +277,10 @@ export default defineComponent({
|
|
|
239
277
|
goToOtpValidation,
|
|
240
278
|
isSubmitBtnDisabled,
|
|
241
279
|
retypeEmail,
|
|
280
|
+
msalLoading,
|
|
281
|
+
USE_SSO,
|
|
282
|
+
msalAuth,
|
|
283
|
+
MicrosoftLogo,
|
|
242
284
|
handleSubmit,
|
|
243
285
|
resetPassword
|
|
244
286
|
}
|