@live-change/user-frontend 0.9.176 → 0.9.177
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/front/src/sign/GoogleAuthReturn.vue +38 -26
- package/package.json +26 -26
|
@@ -20,6 +20,13 @@
|
|
|
20
20
|
<div>Error during authentication</div>
|
|
21
21
|
<div>{{ error }}</div>
|
|
22
22
|
</div>
|
|
23
|
+
<div v-else-if="state === 'emailTaken'" class="text-center">
|
|
24
|
+
<div>
|
|
25
|
+
Your account was created using email address. If you want to connect your Google account,
|
|
26
|
+
you need to sign in with this email address. And connect your Google account using
|
|
27
|
+
<router-link :to="{ name: 'user:connected' }">connected accounts page</router-link>.
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
23
30
|
<div v-else>
|
|
24
31
|
Unknown authentication state: {{ state }}
|
|
25
32
|
</div>
|
|
@@ -62,36 +69,41 @@
|
|
|
62
69
|
state.value = 'canceled'
|
|
63
70
|
return
|
|
64
71
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
api.command(['googleAuthentication', action.value], {
|
|
72
|
+
await workingZone.addPromise(`google ${action.value}`, (async () => {
|
|
73
|
+
try {
|
|
74
|
+
const result = await api.command(['googleAuthentication', action.value], {
|
|
68
75
|
redirectUri: document.location.protocol + '//' + document.location.host
|
|
69
76
|
+ router.resolve({ name: 'user:googleAuthReturn', params: { action: action.value } }).href,
|
|
70
77
|
...query
|
|
71
78
|
})
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
79
|
+
console.log("GAUTH RESULT", result)
|
|
80
|
+
const { action: actionDone, user } = result
|
|
81
|
+
while(user && api.client.value.user !== user) {
|
|
82
|
+
await new Promise(resolve => setTimeout(resolve, 100))
|
|
83
|
+
}
|
|
84
|
+
if(actionDone === 'signIn') {
|
|
85
|
+
router.push({ name: 'user:signInFinished' })
|
|
86
|
+
} else if(actionDone === 'signUp') {
|
|
87
|
+
router.push({ name: 'user:signUpFinished' })
|
|
88
|
+
} else if(actionDone === 'connectGoogle') {
|
|
89
|
+
router.push({ name: 'user:connected' })
|
|
90
|
+
} else if(actionDone === 'addOfflineAccessToken') {
|
|
91
|
+
router.push({ name: 'user:google-access-gained' })
|
|
92
|
+
} else {
|
|
93
|
+
console.error("Unknown action", actionDone)
|
|
94
|
+
}
|
|
95
|
+
} catch(err) {
|
|
96
|
+
if(err?.properties?.email == 'emailTaken') {
|
|
97
|
+
toast.add({ severity: 'error', summary: 'Error', detail: 'Email is already in use', life: 3000 })
|
|
98
|
+
state.value = 'emailTaken'
|
|
99
|
+
return
|
|
100
|
+
}
|
|
101
|
+
console.error("Google auth error", err)
|
|
102
|
+
toast.add({ severity: 'error', summary: 'Error', detail: 'Error during google authentication', life: 3000 })
|
|
103
|
+
state.value = 'error'
|
|
104
|
+
error.value = err
|
|
105
|
+
}
|
|
106
|
+
})())
|
|
95
107
|
})
|
|
96
108
|
|
|
97
109
|
async function back() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/user-frontend",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.177",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"memDev": "tsx --inspect --expose-gc server/start.js memDev --enableSessions --initScript ./init.js --dbAccess",
|
|
6
6
|
"localDevInit": "tsx server/start.js localDev --enableSessions --initScript ./init.js --dbAccess",
|
|
@@ -36,29 +36,29 @@
|
|
|
36
36
|
},
|
|
37
37
|
"type": "module",
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@live-change/cli": "^0.9.
|
|
40
|
-
"@live-change/dao": "^0.9.
|
|
41
|
-
"@live-change/dao-vue3": "^0.9.
|
|
42
|
-
"@live-change/dao-websocket": "^0.9.
|
|
43
|
-
"@live-change/email-service": "^0.9.
|
|
44
|
-
"@live-change/framework": "^0.9.
|
|
45
|
-
"@live-change/identicon-service": "^0.9.
|
|
46
|
-
"@live-change/image-frontend": "^0.9.
|
|
47
|
-
"@live-change/message-authentication-service": "^0.9.
|
|
48
|
-
"@live-change/notification-service": "^0.9.
|
|
49
|
-
"@live-change/password-authentication-service": "^0.9.
|
|
50
|
-
"@live-change/pattern": "^0.9.
|
|
51
|
-
"@live-change/secret-code-service": "^0.9.
|
|
52
|
-
"@live-change/secret-link-service": "^0.9.
|
|
53
|
-
"@live-change/security-frontend": "^0.9.
|
|
54
|
-
"@live-change/security-service": "^0.9.
|
|
55
|
-
"@live-change/session-service": "^0.9.
|
|
56
|
-
"@live-change/timer-service": "^0.9.
|
|
57
|
-
"@live-change/upload-service": "^0.9.
|
|
58
|
-
"@live-change/user-identification-service": "^0.9.
|
|
59
|
-
"@live-change/user-service": "^0.9.
|
|
60
|
-
"@live-change/vue3-components": "^0.9.
|
|
61
|
-
"@live-change/vue3-ssr": "^0.9.
|
|
39
|
+
"@live-change/cli": "^0.9.177",
|
|
40
|
+
"@live-change/dao": "^0.9.177",
|
|
41
|
+
"@live-change/dao-vue3": "^0.9.177",
|
|
42
|
+
"@live-change/dao-websocket": "^0.9.177",
|
|
43
|
+
"@live-change/email-service": "^0.9.177",
|
|
44
|
+
"@live-change/framework": "^0.9.177",
|
|
45
|
+
"@live-change/identicon-service": "^0.9.177",
|
|
46
|
+
"@live-change/image-frontend": "^0.9.177",
|
|
47
|
+
"@live-change/message-authentication-service": "^0.9.177",
|
|
48
|
+
"@live-change/notification-service": "^0.9.177",
|
|
49
|
+
"@live-change/password-authentication-service": "^0.9.177",
|
|
50
|
+
"@live-change/pattern": "^0.9.177",
|
|
51
|
+
"@live-change/secret-code-service": "^0.9.177",
|
|
52
|
+
"@live-change/secret-link-service": "^0.9.177",
|
|
53
|
+
"@live-change/security-frontend": "^0.9.177",
|
|
54
|
+
"@live-change/security-service": "^0.9.177",
|
|
55
|
+
"@live-change/session-service": "^0.9.177",
|
|
56
|
+
"@live-change/timer-service": "^0.9.177",
|
|
57
|
+
"@live-change/upload-service": "^0.9.177",
|
|
58
|
+
"@live-change/user-identification-service": "^0.9.177",
|
|
59
|
+
"@live-change/user-service": "^0.9.177",
|
|
60
|
+
"@live-change/vue3-components": "^0.9.177",
|
|
61
|
+
"@live-change/vue3-ssr": "^0.9.177",
|
|
62
62
|
"@vueuse/core": "^12.3.0",
|
|
63
63
|
"codeceptjs-assert": "^0.0.5",
|
|
64
64
|
"codeceptjs-video-helper": "0.1.3",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"wtfnode": "^0.9.1"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
|
-
"@live-change/codeceptjs-helper": "^0.9.
|
|
82
|
+
"@live-change/codeceptjs-helper": "^0.9.177",
|
|
83
83
|
"codeceptjs": "^3.6.10",
|
|
84
84
|
"generate-password": "1.7.1",
|
|
85
85
|
"playwright": "1.49.1",
|
|
@@ -90,5 +90,5 @@
|
|
|
90
90
|
"author": "Michał Łaszczewski <michal@laszczewski.pl>",
|
|
91
91
|
"license": "BSD-3-Clause",
|
|
92
92
|
"description": "",
|
|
93
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "d75c8c63935b7b78623248d255820b1da2676929"
|
|
94
94
|
}
|