cabloy 5.1.184 → 5.1.186

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/.cabloy-version CHANGED
@@ -1 +1 @@
1
- 5.1.184
1
+ 5.1.186
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.1.186
4
+
5
+ ### Improvements
6
+
7
+ - Update the OAuth authentication provider.
8
+
9
+ ## 5.1.185
10
+
11
+ ### Features
12
+
13
+ - Add GitHub authentication support.
14
+
3
15
  ## 5.1.184
4
16
 
5
17
  ### Improvements
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cabloy",
3
- "version": "5.1.184",
3
+ "version": "5.1.186",
4
4
  "gitHead": "2c5c19284bab738e492856189acb6fad74b8a7b7",
5
5
  "description": "A Node.js fullstack framework",
6
6
  "keywords": [
package/vona/env/.env CHANGED
@@ -11,13 +11,13 @@ CORS_WHITE_LIST =
11
11
  SERVER_KEYS = vona__1596889047267_3245
12
12
  SERVER_GLOBALPREFIX = /api
13
13
  SERVER_PUBLICDIR =
14
- SERVER_SUBDOMAINOFFSET = 2
15
14
  SERVER_WORKERS =
16
15
  SERVER_LISTEN_HOSTNAME = 0.0.0.0
17
16
  SERVER_LISTEN_PORT = 7102
18
17
  SERVER_LISTEN_DISABLE =
19
18
  SERVER_SERVE_PROTOCOL =
20
19
  SERVER_SERVE_HOST =
20
+ SERVER_SUBDOMAINOFFSET = 2
21
21
 
22
22
  # project
23
23
 
@@ -92,6 +92,11 @@ HOME_USER_DISABLE_USER_ADMIN = false
92
92
  HOME_USER_BUILTIN_ROLE_REGISTERED_USER_SITE_IDS = *
93
93
  HOME_USER_BUILTIN_ROLE_SYSTEM_ADMIN_SITE_IDS = *
94
94
 
95
+ # auth
96
+
97
+ AUTH_GITHUB_CLIENTID =
98
+ AUTH_GITHUB_CLIENTSECRET =
99
+
95
100
  # payment
96
101
 
97
102
  PAY_MOCK_DEFAULT_CREDENTIAL = pay-mock-dev-credential
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vona",
3
- "version": "5.1.95",
3
+ "version": "5.1.97",
4
4
  "gitHead": "a79189b882c17af5911573896a781bbb0046d37d",
5
5
  "description": "Vona is an intuitive, elegant and powerful Node.js framework for rapidly developing enterprise applications of any size",
6
6
  "keywords": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vona-module-auth-oauth",
3
- "version": "5.0.10",
3
+ "version": "5.0.12",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "Vona Module"
@@ -7,6 +7,7 @@ import type {
7
7
  } from 'vona-module-a-auth';
8
8
 
9
9
  import StrategyGithub from 'passport-github';
10
+ import { useApp } from 'vona';
10
11
  import { AuthProvider, BeanAuthProviderOauth2Base } from 'vona-module-a-auth';
11
12
 
12
13
  export interface IAuthProviderOauthClientOptionsGithub extends IAuthProviderOauthClientOptions {
@@ -27,6 +28,8 @@ export interface IAuthProviderOptionsOauth extends IDecoratorAuthProviderOptions
27
28
  IAuthProviderOauthClientOptions
28
29
  > {}
29
30
 
31
+ const app = useApp();
32
+
30
33
  @AuthProvider<IAuthProviderOptionsOauth>({
31
34
  base: {
32
35
  confirmed: true,
@@ -36,6 +39,8 @@ export interface IAuthProviderOptionsOauth extends IDecoratorAuthProviderOptions
36
39
  clients: {
37
40
  github: {
38
41
  Strategy: StrategyGithub,
42
+ clientID: app.meta.env.AUTH_GITHUB_CLIENTID || 'Shoule specify clientID',
43
+ clientSecret: app.meta.env.AUTH_GITHUB_CLIENTSECRET || 'Shoule specify clientSecret',
39
44
  },
40
45
  },
41
46
  })
@@ -1 +1,2 @@
1
+ export * from './types/index.ts';
1
2
  export * from './.metadata/index.ts';
@@ -0,0 +1,8 @@
1
+ declare module 'vona' {
2
+ export interface VonaConfigEnv {
3
+ AUTH_GITHUB_CLIENTID: string | undefined;
4
+ AUTH_GITHUB_CLIENTSECRET: string | undefined;
5
+ }
6
+ }
7
+
8
+ export {};
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vona-suite-a-auth",
3
- "version": "5.1.24",
3
+ "version": "5.1.26",
4
4
  "gitHead": "a79189b882c17af5911573896a781bbb0046d37d",
5
5
  "description": "",
6
6
  "author": "",
@@ -8,7 +8,7 @@
8
8
  "type": "module",
9
9
  "dependencies": {
10
10
  "vona-module-a-auth": "workspace:^",
11
- "vona-module-auth-oauth": "^5.0.10",
11
+ "vona-module-auth-oauth": "^5.0.12",
12
12
  "vona-module-auth-simple": "workspace:^"
13
13
  },
14
14
  "title": "a-auth"