@live-change/user-frontend 0.9.9 → 0.9.11
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.
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
accessType: {
|
|
50
50
|
type: String,
|
|
51
|
-
default: '
|
|
51
|
+
default: 'online', //'offline'
|
|
52
52
|
},
|
|
53
53
|
scopes: {
|
|
54
54
|
type: Array,
|
|
@@ -75,8 +75,12 @@
|
|
|
75
75
|
}, 4000)
|
|
76
76
|
}))
|
|
77
77
|
|
|
78
|
+
let allScopes = new Set(scopes.value ?? [])
|
|
79
|
+
allScopes.add('profile') // it will be needed if account is not connected
|
|
80
|
+
allScopes.add('email') // it will be needed if account is not connected
|
|
81
|
+
|
|
78
82
|
googleAuthRedirect({
|
|
79
|
-
scope: (
|
|
83
|
+
scope: Array.from(allScopes).join(' '),
|
|
80
84
|
redirectUri: document.location.protocol + '//' + document.location.host
|
|
81
85
|
+ router.resolve({ name: 'user:googleAuthReturn', params: { action: action.value } }).href,
|
|
82
86
|
accessType: accessType.value,
|
package/front/src/sign/routes.js
CHANGED
|
@@ -5,7 +5,7 @@ export function routes(config = {}) {
|
|
|
5
5
|
|
|
6
6
|
route({ name: 'user:googleAuth', path: prefix + 'google-auth/:action',
|
|
7
7
|
component: () => import("./GoogleAuth.vue"), props: true, meta: { } }),
|
|
8
|
-
route({ name: 'user:googleAuthScopes', path: prefix + 'google-auth/:action/:scopes*',
|
|
8
|
+
route({ name: 'user:googleAuthScopes', path: prefix + 'google-auth/:action/:accessType/:scopes*',
|
|
9
9
|
component: () => import("./GoogleAuth.vue"), props: true, meta: { } }),
|
|
10
10
|
route({ name: 'user:googleAuthReturn', path: prefix + 'google-auth-return/:action',
|
|
11
11
|
component: () => import("./GoogleAuthReturn.vue"), props: true }),
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export function getAuthorizationUri(config) {
|
|
2
2
|
const {
|
|
3
3
|
authorizationBase = 'https://accounts.google.com/o/oauth2/auth',
|
|
4
|
-
accessType = '
|
|
4
|
+
accessType = 'online',
|
|
5
5
|
approvalPrompt = 'force',
|
|
6
6
|
scope,
|
|
7
7
|
responseType = 'code',
|
|
8
|
+
includeGrantedScopes = true,
|
|
8
9
|
clientId,
|
|
9
10
|
redirectUri = 'urn:ietf:wg:oauth:2.0:oob',
|
|
10
11
|
} = config
|
|
@@ -12,10 +13,14 @@ export function getAuthorizationUri(config) {
|
|
|
12
13
|
const authorizationUri = authorizationBase +
|
|
13
14
|
`?access_type=${accessType}&approval_prompt=${approvalPrompt}` +
|
|
14
15
|
`&scope=${encodeURIComponent(scope)}&response_type=${responseType}`+
|
|
16
|
+
(includeGrantedScopes ? `&include_granted_scopes=true` : '') +
|
|
15
17
|
`&client_id=${encodeURIComponent(clientId)}`+
|
|
16
18
|
//`&state=${encodeURIComponent(clientId)}` +
|
|
17
19
|
`&redirect_uri=${encodeURIComponent(redirectUri)}`
|
|
18
20
|
|
|
21
|
+
console.log("auth config", config)
|
|
22
|
+
console.log("AUTH URI", authorizationUri)
|
|
23
|
+
|
|
19
24
|
return authorizationUri
|
|
20
25
|
}
|
|
21
26
|
|
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.11",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"memDev": "node --inspect --expose-gc server/start.js memDev --enableSessions --initScript ./init.js --dbAccess",
|
|
6
6
|
"localDevInit": "rm tmp.db; node server/start.js localDev --enableSessions --initScript ./init.js",
|
|
@@ -22,29 +22,29 @@
|
|
|
22
22
|
},
|
|
23
23
|
"type": "module",
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@live-change/cli": "^0.9.
|
|
26
|
-
"@live-change/dao": "^0.9.
|
|
27
|
-
"@live-change/dao-vue3": "^0.9.
|
|
28
|
-
"@live-change/dao-websocket": "^0.9.
|
|
29
|
-
"@live-change/email-service": "^0.9.
|
|
30
|
-
"@live-change/framework": "^0.9.
|
|
31
|
-
"@live-change/identicon-service": "^0.9.
|
|
32
|
-
"@live-change/image-frontend": "^0.9.
|
|
33
|
-
"@live-change/message-authentication-service": "^0.9.
|
|
34
|
-
"@live-change/notification-service": "^0.9.
|
|
35
|
-
"@live-change/password-authentication-service": "^0.9.
|
|
36
|
-
"@live-change/pattern": "^0.9.
|
|
37
|
-
"@live-change/secret-code-service": "^0.9.
|
|
38
|
-
"@live-change/secret-link-service": "^0.9.
|
|
39
|
-
"@live-change/security-frontend": "^0.9.
|
|
40
|
-
"@live-change/security-service": "^0.9.
|
|
41
|
-
"@live-change/session-service": "^0.9.
|
|
42
|
-
"@live-change/timer-service": "^0.9.
|
|
43
|
-
"@live-change/upload-service": "^0.9.
|
|
44
|
-
"@live-change/user-identification-service": "^0.9.
|
|
45
|
-
"@live-change/user-service": "^0.9.
|
|
46
|
-
"@live-change/vue3-components": "^0.9.
|
|
47
|
-
"@live-change/vue3-ssr": "^0.9.
|
|
25
|
+
"@live-change/cli": "^0.9.11",
|
|
26
|
+
"@live-change/dao": "^0.9.11",
|
|
27
|
+
"@live-change/dao-vue3": "^0.9.11",
|
|
28
|
+
"@live-change/dao-websocket": "^0.9.11",
|
|
29
|
+
"@live-change/email-service": "^0.9.11",
|
|
30
|
+
"@live-change/framework": "^0.9.11",
|
|
31
|
+
"@live-change/identicon-service": "^0.9.11",
|
|
32
|
+
"@live-change/image-frontend": "^0.9.11",
|
|
33
|
+
"@live-change/message-authentication-service": "^0.9.11",
|
|
34
|
+
"@live-change/notification-service": "^0.9.11",
|
|
35
|
+
"@live-change/password-authentication-service": "^0.9.11",
|
|
36
|
+
"@live-change/pattern": "^0.9.11",
|
|
37
|
+
"@live-change/secret-code-service": "^0.9.11",
|
|
38
|
+
"@live-change/secret-link-service": "^0.9.11",
|
|
39
|
+
"@live-change/security-frontend": "^0.9.11",
|
|
40
|
+
"@live-change/security-service": "^0.9.11",
|
|
41
|
+
"@live-change/session-service": "^0.9.11",
|
|
42
|
+
"@live-change/timer-service": "^0.9.11",
|
|
43
|
+
"@live-change/upload-service": "^0.9.11",
|
|
44
|
+
"@live-change/user-identification-service": "^0.9.11",
|
|
45
|
+
"@live-change/user-service": "^0.9.11",
|
|
46
|
+
"@live-change/vue3-components": "^0.9.11",
|
|
47
|
+
"@live-change/vue3-ssr": "^0.9.11",
|
|
48
48
|
"@vueuse/core": "^10.11.0",
|
|
49
49
|
"codeceptjs-assert": "^0.0.5",
|
|
50
50
|
"codeceptjs-video-helper": "0.1.3",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"wtfnode": "^0.9.1"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@live-change/codeceptjs-helper": "^0.9.
|
|
68
|
+
"@live-change/codeceptjs-helper": "^0.9.11",
|
|
69
69
|
"codeceptjs": "^3.6.5",
|
|
70
70
|
"generate-password": "1.7.1",
|
|
71
71
|
"playwright": "1.48.1",
|
|
@@ -76,5 +76,5 @@
|
|
|
76
76
|
"author": "Michał Łaszczewski <michal@laszczewski.pl>",
|
|
77
77
|
"license": "BSD-3-Clause",
|
|
78
78
|
"description": "",
|
|
79
|
-
"gitHead": "
|
|
79
|
+
"gitHead": "a1bd367ae175f0937d999577f1b10bf10e7df0fb"
|
|
80
80
|
}
|