@betterportal/auth-workos 0.0.1

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.
Files changed (70) hide show
  1. package/README.md +18 -0
  2. package/betterportal-logo.png +0 -0
  3. package/bsb-plugin.json +23 -0
  4. package/lib/index.d.ts +2 -0
  5. package/lib/index.d.ts.map +1 -0
  6. package/lib/index.js +2 -0
  7. package/lib/index.js.map +1 -0
  8. package/lib/plugins/service-betterportal-auth-workos/.bp-generated/registry.d.ts +3 -0
  9. package/lib/plugins/service-betterportal-auth-workos/.bp-generated/registry.d.ts.map +1 -0
  10. package/lib/plugins/service-betterportal-auth-workos/.bp-generated/registry.js +97 -0
  11. package/lib/plugins/service-betterportal-auth-workos/.bp-generated/registry.js.map +1 -0
  12. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/GET.d.ts +3 -0
  13. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/GET.d.ts.map +1 -0
  14. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/GET.js +3 -0
  15. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/GET.js.map +1 -0
  16. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/_theme.bootstrap1/GET.d.ts +5 -0
  17. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/_theme.bootstrap1/GET.d.ts.map +1 -0
  18. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/_theme.bootstrap1/GET.js +61 -0
  19. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/_theme.bootstrap1/GET.js.map +1 -0
  20. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/_theme.bootstrap1/_background.monitor.GET.d.ts +5 -0
  21. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/_theme.bootstrap1/_background.monitor.GET.d.ts.map +1 -0
  22. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/_theme.bootstrap1/_background.monitor.GET.js +5 -0
  23. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/_theme.bootstrap1/_background.monitor.GET.js.map +1 -0
  24. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/_theme.bootstrap1/_nav.profile.GET.d.ts +5 -0
  25. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/_theme.bootstrap1/_nav.profile.GET.d.ts.map +1 -0
  26. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/_theme.bootstrap1/_nav.profile.GET.js +10 -0
  27. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/_theme.bootstrap1/_nav.profile.GET.js.map +1 -0
  28. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/_theme.embedded/_background.monitor.GET.d.ts +3 -0
  29. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/_theme.embedded/_background.monitor.GET.d.ts.map +1 -0
  30. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/_theme.embedded/_background.monitor.GET.js +3 -0
  31. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/_theme.embedded/_background.monitor.GET.js.map +1 -0
  32. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/index.d.ts +2 -0
  33. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/index.d.ts.map +1 -0
  34. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/index.js +2 -0
  35. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/index.js.map +1 -0
  36. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/route.impl.d.ts +60 -0
  37. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/route.impl.d.ts.map +1 -0
  38. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/route.impl.js +154 -0
  39. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/route.impl.js.map +1 -0
  40. package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/GET.d.ts +3 -0
  41. package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/GET.d.ts.map +1 -0
  42. package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/GET.js +3 -0
  43. package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/GET.js.map +1 -0
  44. package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/index.d.ts +2 -0
  45. package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/index.d.ts.map +1 -0
  46. package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/index.js +2 -0
  47. package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/index.js.map +1 -0
  48. package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/route.impl.d.ts +27 -0
  49. package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/route.impl.d.ts.map +1 -0
  50. package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/route.impl.js +35 -0
  51. package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/route.impl.js.map +1 -0
  52. package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/POST.d.ts +3 -0
  53. package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/POST.d.ts.map +1 -0
  54. package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/POST.js +3 -0
  55. package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/POST.js.map +1 -0
  56. package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/index.d.ts +2 -0
  57. package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/index.d.ts.map +1 -0
  58. package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/index.js +2 -0
  59. package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/index.js.map +1 -0
  60. package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/route.impl.d.ts +32 -0
  61. package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/route.impl.d.ts.map +1 -0
  62. package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/route.impl.js +78 -0
  63. package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/route.impl.js.map +1 -0
  64. package/lib/plugins/service-betterportal-auth-workos/index.d.ts +166 -0
  65. package/lib/plugins/service-betterportal-auth-workos/index.d.ts.map +1 -0
  66. package/lib/plugins/service-betterportal-auth-workos/index.js +575 -0
  67. package/lib/plugins/service-betterportal-auth-workos/index.js.map +1 -0
  68. package/lib/schemas/service-betterportal-auth-workos.json +138 -0
  69. package/lib/schemas/service-betterportal-auth-workos.plugin.json +151 -0
  70. package/package.json +69 -0
@@ -0,0 +1,138 @@
1
+ {
2
+ "pluginName": "service.betterportal.auth.workos",
3
+ "events": {},
4
+ "version": "10.0.1",
5
+ "configSchema": {
6
+ "anyvaliVersion": "1.0",
7
+ "schemaVersion": "1.1",
8
+ "root": {
9
+ "kind": "object",
10
+ "properties": {
11
+ "host": {
12
+ "kind": "string",
13
+ "minLength": 1,
14
+ "default": "0.0.0.0"
15
+ },
16
+ "port": {
17
+ "kind": "int",
18
+ "min": 1,
19
+ "default": 3213
20
+ },
21
+ "issuer": {
22
+ "kind": "string",
23
+ "minLength": 1
24
+ },
25
+ "audience": {
26
+ "kind": "string",
27
+ "minLength": 1,
28
+ "default": "betterportal-runtime"
29
+ },
30
+ "accessTokenSeconds": {
31
+ "kind": "int",
32
+ "min": 1,
33
+ "default": 900
34
+ },
35
+ "refreshTokenSeconds": {
36
+ "kind": "int",
37
+ "min": 1,
38
+ "default": 604800
39
+ },
40
+ "keyStorePath": {
41
+ "kind": "string",
42
+ "minLength": 1,
43
+ "default": "./.bp-workos-state/keys.json"
44
+ },
45
+ "betterportal": {
46
+ "kind": "optional",
47
+ "inner": {
48
+ "kind": "object",
49
+ "properties": {
50
+ "bpConfigPath": {
51
+ "kind": "optional",
52
+ "inner": {
53
+ "kind": "string",
54
+ "minLength": 1
55
+ }
56
+ },
57
+ "configApiToken": {
58
+ "kind": "optional",
59
+ "inner": {
60
+ "kind": "string",
61
+ "minLength": 1
62
+ }
63
+ },
64
+ "configEncryptionKey": {
65
+ "kind": "optional",
66
+ "inner": {
67
+ "kind": "string",
68
+ "minLength": 16
69
+ }
70
+ },
71
+ "controlPlaneUrl": {
72
+ "kind": "optional",
73
+ "inner": {
74
+ "kind": "string",
75
+ "minLength": 1
76
+ }
77
+ },
78
+ "serviceApiKey": {
79
+ "kind": "optional",
80
+ "inner": {
81
+ "kind": "string",
82
+ "minLength": 1
83
+ }
84
+ },
85
+ "bootstrapStatePath": {
86
+ "kind": "string",
87
+ "minLength": 1,
88
+ "default": "./.bp-bootstrap/state.enc"
89
+ },
90
+ "scopedConfigCachePath": {
91
+ "kind": "string",
92
+ "minLength": 1,
93
+ "default": "./.bp-sync-cache/scoped.json"
94
+ },
95
+ "trustedProxyHeaders": {
96
+ "kind": "bool",
97
+ "default": false
98
+ },
99
+ "cfProxy": {
100
+ "kind": "bool",
101
+ "default": false
102
+ },
103
+ "trustedProxyIps": {
104
+ "kind": "array",
105
+ "items": {
106
+ "kind": "string",
107
+ "minLength": 1
108
+ },
109
+ "default": []
110
+ }
111
+ },
112
+ "required": [
113
+ "bootstrapStatePath",
114
+ "scopedConfigCachePath",
115
+ "trustedProxyHeaders",
116
+ "cfProxy",
117
+ "trustedProxyIps"
118
+ ],
119
+ "unknownKeys": "strip"
120
+ }
121
+ }
122
+ },
123
+ "required": [
124
+ "host",
125
+ "port",
126
+ "issuer",
127
+ "audience",
128
+ "accessTokenSeconds",
129
+ "refreshTokenSeconds",
130
+ "keyStorePath"
131
+ ],
132
+ "unknownKeys": "strip"
133
+ },
134
+ "definitions": {},
135
+ "extensions": {}
136
+ },
137
+ "pluginType": "service"
138
+ }
@@ -0,0 +1,151 @@
1
+ {
2
+ "id": "service-betterportal-auth-workos",
3
+ "name": "service.betterportal.auth.workos",
4
+ "version": "10.0.1",
5
+ "description": "BetterPortal WorkOS auth service",
6
+ "category": "service",
7
+ "tags": [
8
+ "betterportal",
9
+ "auth",
10
+ "workos"
11
+ ],
12
+ "documentation": [
13
+ "./README.md"
14
+ ],
15
+ "dependencies": [],
16
+ "author": "BetterCorp",
17
+ "license": "(AGPL-3.0-only OR Commercial)",
18
+ "image": "./betterportal-logo.png",
19
+ "configSchema": {
20
+ "anyvaliVersion": "1.0",
21
+ "schemaVersion": "1.1",
22
+ "root": {
23
+ "kind": "object",
24
+ "properties": {
25
+ "host": {
26
+ "kind": "string",
27
+ "minLength": 1,
28
+ "default": "0.0.0.0"
29
+ },
30
+ "port": {
31
+ "kind": "int",
32
+ "min": 1,
33
+ "default": 3213
34
+ },
35
+ "issuer": {
36
+ "kind": "string",
37
+ "minLength": 1
38
+ },
39
+ "audience": {
40
+ "kind": "string",
41
+ "minLength": 1,
42
+ "default": "betterportal-runtime"
43
+ },
44
+ "accessTokenSeconds": {
45
+ "kind": "int",
46
+ "min": 1,
47
+ "default": 900
48
+ },
49
+ "refreshTokenSeconds": {
50
+ "kind": "int",
51
+ "min": 1,
52
+ "default": 604800
53
+ },
54
+ "keyStorePath": {
55
+ "kind": "string",
56
+ "minLength": 1,
57
+ "default": "./.bp-workos-state/keys.json"
58
+ },
59
+ "betterportal": {
60
+ "kind": "optional",
61
+ "inner": {
62
+ "kind": "object",
63
+ "properties": {
64
+ "bpConfigPath": {
65
+ "kind": "optional",
66
+ "inner": {
67
+ "kind": "string",
68
+ "minLength": 1
69
+ }
70
+ },
71
+ "configApiToken": {
72
+ "kind": "optional",
73
+ "inner": {
74
+ "kind": "string",
75
+ "minLength": 1
76
+ }
77
+ },
78
+ "configEncryptionKey": {
79
+ "kind": "optional",
80
+ "inner": {
81
+ "kind": "string",
82
+ "minLength": 16
83
+ }
84
+ },
85
+ "controlPlaneUrl": {
86
+ "kind": "optional",
87
+ "inner": {
88
+ "kind": "string",
89
+ "minLength": 1
90
+ }
91
+ },
92
+ "serviceApiKey": {
93
+ "kind": "optional",
94
+ "inner": {
95
+ "kind": "string",
96
+ "minLength": 1
97
+ }
98
+ },
99
+ "bootstrapStatePath": {
100
+ "kind": "string",
101
+ "minLength": 1,
102
+ "default": "./.bp-bootstrap/state.enc"
103
+ },
104
+ "scopedConfigCachePath": {
105
+ "kind": "string",
106
+ "minLength": 1,
107
+ "default": "./.bp-sync-cache/scoped.json"
108
+ },
109
+ "trustedProxyHeaders": {
110
+ "kind": "bool",
111
+ "default": false
112
+ },
113
+ "cfProxy": {
114
+ "kind": "bool",
115
+ "default": false
116
+ },
117
+ "trustedProxyIps": {
118
+ "kind": "array",
119
+ "items": {
120
+ "kind": "string",
121
+ "minLength": 1
122
+ },
123
+ "default": []
124
+ }
125
+ },
126
+ "required": [
127
+ "bootstrapStatePath",
128
+ "scopedConfigCachePath",
129
+ "trustedProxyHeaders",
130
+ "cfProxy",
131
+ "trustedProxyIps"
132
+ ],
133
+ "unknownKeys": "strip"
134
+ }
135
+ }
136
+ },
137
+ "required": [
138
+ "host",
139
+ "port",
140
+ "issuer",
141
+ "audience",
142
+ "accessTokenSeconds",
143
+ "refreshTokenSeconds",
144
+ "keyStorePath"
145
+ ],
146
+ "unknownKeys": "strip"
147
+ },
148
+ "definitions": {},
149
+ "extensions": {}
150
+ }
151
+ }
package/package.json ADDED
@@ -0,0 +1,69 @@
1
+ {
2
+ "name": "@betterportal/auth-workos",
3
+ "version": "0.0.1",
4
+ "description": "BetterPortal WorkOS auth service for Node.js",
5
+ "main": "lib/index.js",
6
+ "types": "src/index.ts",
7
+ "scripts": {
8
+ "bp-codegen": "bp-codegen",
9
+ "build": "bsb-plugin-cli build",
10
+ "clean": "bsb-plugin-cli clean",
11
+ "start": "bsb-plugin-cli start",
12
+ "dev": "bsb-plugin-cli dev",
13
+ "test": "tsx --test tests/*.test.ts",
14
+ "prepublishOnly": "npm run build",
15
+ "publish:client": "bsb-client-cli publish"
16
+ },
17
+ "keywords": [
18
+ "betterportal",
19
+ "auth",
20
+ "workos",
21
+ "platform-service"
22
+ ],
23
+ "author": "BetterCorp",
24
+ "license": "(AGPL-3.0-only OR Commercial)",
25
+ "type": "module",
26
+ "devDependencies": {
27
+ "@types/node": "^26.0.0",
28
+ "tsx": "^4.21.0",
29
+ "typescript": "^6.0.3"
30
+ },
31
+ "dependencies": {
32
+ "@betterportal/framework": "10.0.1",
33
+ "@betterportal/plugin-bsb": "10.0.1",
34
+ "@bsb/base": "^9.6.41",
35
+ "@workos-inc/node": "^10.7.0",
36
+ "anyvali": "^1.0.6",
37
+ "jsonwebtoken": "^9.0.2",
38
+ "jsx-htmx": "4.0.0-beta4"
39
+ },
40
+ "files": [
41
+ "lib/**/*",
42
+ "README.md",
43
+ "bsb-plugin.json",
44
+ "betterportal-logo.png"
45
+ ],
46
+ "bsb": {
47
+ "orgId": "betterportal",
48
+ "hooks": {
49
+ "afterSchemas": "bp-codegen"
50
+ }
51
+ },
52
+ "betterportal": {
53
+ "routes": [
54
+ "src/plugins/service-betterportal-auth-workos/bp-routes/"
55
+ ]
56
+ },
57
+ "repository": {
58
+ "type": "git",
59
+ "url": "git+https://github.com/BetterCorp/BetterPortal.git",
60
+ "directory": "services/nodejs/auth-workos"
61
+ },
62
+ "publishConfig": {
63
+ "access": "public"
64
+ },
65
+ "homepage": "https://github.com/BetterCorp/BetterPortal#readme",
66
+ "bugs": {
67
+ "url": "https://github.com/BetterCorp/BetterPortal/issues"
68
+ }
69
+ }