@live-change/user-frontend 0.8.63 → 0.8.65

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.
@@ -0,0 +1,29 @@
1
+ export function getAuthorizationUri(config) {
2
+ const {
3
+ authorizationBase = 'https://www.linkedin.com/oauth/v2/authorization',
4
+ accessType = 'offline',
5
+ approvalPrompt = 'force',
6
+ scope,
7
+ responseType = 'code',
8
+ clientId = ENV_LINKEDIN_CLIENT_ID,
9
+ redirectUri = 'urn:ietf:wg:oauth:2.0:oob',
10
+ } = config
11
+
12
+ const authorizationUri = authorizationBase +
13
+ `?access_type=${accessType}&approval_prompt=${approvalPrompt}` +
14
+ `&scope=${encodeURIComponent(scope)}&response_type=${responseType}`+
15
+ `&client_id=${encodeURIComponent(clientId)}`+
16
+ //`&state=${encodeURIComponent(clientId)}` +
17
+ `&redirect_uri=${encodeURIComponent(redirectUri)}`
18
+
19
+ return authorizationUri
20
+ }
21
+
22
+ export function linkedinAuthRedirect(opts) {
23
+ const authUri = getAuthorizationUri({
24
+ ...opts
25
+ })
26
+ console.log("AUTH URI", authUri)
27
+
28
+ setTimeout(() => window.location = authUri, 100)
29
+ }
package/index.js CHANGED
@@ -17,4 +17,6 @@ export { Password }
17
17
  import GoogleAccess from './front/src/google-access/GoogleAccess.vue'
18
18
  export { GoogleAccess }
19
19
 
20
+ export * from './front/src/connected/connected.js'
21
+
20
22
  export * from "./front/src/router.js"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/user-frontend",
3
- "version": "0.8.63",
3
+ "version": "0.8.65",
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.8.63",
26
- "@live-change/dao": "^0.8.63",
27
- "@live-change/dao-vue3": "^0.8.63",
28
- "@live-change/dao-websocket": "^0.8.63",
29
- "@live-change/email-service": "^0.8.63",
30
- "@live-change/framework": "^0.8.63",
31
- "@live-change/identicon-service": "^0.8.63",
32
- "@live-change/image-frontend": "^0.8.63",
33
- "@live-change/message-authentication-service": "^0.8.63",
34
- "@live-change/notification-service": "^0.8.63",
35
- "@live-change/password-authentication-service": "^0.8.63",
36
- "@live-change/pattern": "^0.8.63",
37
- "@live-change/secret-code-service": "^0.8.63",
38
- "@live-change/secret-link-service": "^0.8.63",
39
- "@live-change/security-frontend": "^0.8.63",
40
- "@live-change/security-service": "^0.8.63",
41
- "@live-change/session-service": "^0.8.63",
42
- "@live-change/timer-service": "^0.8.63",
43
- "@live-change/upload-service": "^0.8.63",
44
- "@live-change/user-identification-service": "^0.8.63",
45
- "@live-change/user-service": "^0.8.63",
46
- "@live-change/vue3-components": "^0.8.63",
47
- "@live-change/vue3-ssr": "^0.8.63",
25
+ "@live-change/cli": "^0.8.65",
26
+ "@live-change/dao": "^0.8.65",
27
+ "@live-change/dao-vue3": "^0.8.65",
28
+ "@live-change/dao-websocket": "^0.8.65",
29
+ "@live-change/email-service": "^0.8.65",
30
+ "@live-change/framework": "^0.8.65",
31
+ "@live-change/identicon-service": "^0.8.65",
32
+ "@live-change/image-frontend": "^0.8.65",
33
+ "@live-change/message-authentication-service": "^0.8.65",
34
+ "@live-change/notification-service": "^0.8.65",
35
+ "@live-change/password-authentication-service": "^0.8.65",
36
+ "@live-change/pattern": "^0.8.65",
37
+ "@live-change/secret-code-service": "^0.8.65",
38
+ "@live-change/secret-link-service": "^0.8.65",
39
+ "@live-change/security-frontend": "^0.8.65",
40
+ "@live-change/security-service": "^0.8.65",
41
+ "@live-change/session-service": "^0.8.65",
42
+ "@live-change/timer-service": "^0.8.65",
43
+ "@live-change/upload-service": "^0.8.65",
44
+ "@live-change/user-identification-service": "^0.8.65",
45
+ "@live-change/user-service": "^0.8.65",
46
+ "@live-change/vue3-components": "^0.8.65",
47
+ "@live-change/vue3-ssr": "^0.8.65",
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.8.63",
68
+ "@live-change/codeceptjs-helper": "^0.8.65",
69
69
  "codeceptjs": "^3.6.5",
70
70
  "generate-password": "1.7.1",
71
71
  "playwright": "^1.41.2",
@@ -76,5 +76,5 @@
76
76
  "author": "Michał Łaszczewski <michal@laszczewski.pl>",
77
77
  "license": "BSD-3-Clause",
78
78
  "description": "",
79
- "gitHead": "f49f580138d6c44d9e9820197765ef982c5bab03"
79
+ "gitHead": "c239699e9aea10bb7ae0baca0ab980ff1d9f5f94"
80
80
  }
@@ -5,7 +5,7 @@ import dotenv from 'dotenv'
5
5
  dotenv.config()
6
6
 
7
7
  const contactTypes = ['email', 'phone']
8
- const remoteAccountTypes = ['google']
8
+ const remoteAccountTypes = ['google', 'linkedin']
9
9
 
10
10
  import securityConfig from './security.config.js'
11
11
 
@@ -59,6 +59,9 @@ app.config = {
59
59
  name: 'googleAuthentication',
60
60
  path: '@live-change/google-authentication-service',
61
61
  },
62
+ {
63
+ name: 'linkedinAuthentication',
64
+ },
62
65
  {
63
66
  name: 'security',
64
67
  path: '@live-change/security-service',
@@ -85,6 +88,11 @@ app.config = {
85
88
  name: 'upload',
86
89
  path: '@live-change/upload-service'
87
90
  },
91
+ {
92
+ name: 'geoIp',
93
+ geoIpCountryPath: 'geoip/GeoLite2-Country.mmdb',
94
+ geoIpDefaultCountry: 'PL'
95
+ },
88
96
  {
89
97
  name: 'image',
90
98
  path: '@live-change/image-service'
@@ -7,6 +7,7 @@ import passwordAuthentication from '@live-change/password-authentication-service
7
7
  import userIdentification from '@live-change/user-identification-service'
8
8
  import identicon from '@live-change/identicon-service'
9
9
  import localeSettings from '@live-change/locale-settings-service'
10
+ import geoIp from '@live-change/geoip-service'
10
11
  import security from '@live-change/security-service'
11
12
  import notification from '@live-change/notification-service'
12
13
  import upload from '@live-change/upload-service'
@@ -15,6 +16,7 @@ import secretCode from '@live-change/secret-code-service'
15
16
  import secretLink from '@live-change/secret-link-service'
16
17
  import messageAuthentication from '@live-change/message-authentication-service'
17
18
  import googleAuthentication from '@live-change/google-authentication-service'
19
+ import linkedinAuthentication from '@live-change/linkedin-authentication-service'
18
20
 
19
21
  //import backup from '@live-change/backup-service'
20
22
  import init from './init.js'
@@ -36,7 +38,9 @@ export {
36
38
  secretLink,
37
39
  messageAuthentication,
38
40
  googleAuthentication,
41
+ linkedinAuthentication,
39
42
  localeSettings,
43
+ geoIp,
40
44
  // backup,
41
45
  init
42
46
  }