@budibase/worker 1.2.43 → 1.2.44-alpha.2
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/worker",
|
|
3
3
|
"email": "hi@budibase.com",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.44-alpha.2",
|
|
5
5
|
"description": "Budibase background service",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"repository": {
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
"author": "Budibase",
|
|
36
36
|
"license": "GPL-3.0",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@budibase/backend-core": "
|
|
39
|
-
"@budibase/pro": "1.2.
|
|
40
|
-
"@budibase/string-templates": "
|
|
41
|
-
"@budibase/types": "
|
|
38
|
+
"@budibase/backend-core": "1.2.44-alpha.2",
|
|
39
|
+
"@budibase/pro": "1.2.44-alpha.1",
|
|
40
|
+
"@budibase/string-templates": "1.2.44-alpha.2",
|
|
41
|
+
"@budibase/types": "1.2.44-alpha.2",
|
|
42
42
|
"@koa/router": "8.0.8",
|
|
43
43
|
"@sentry/node": "6.17.7",
|
|
44
44
|
"@techpass/passport-openidconnect": "0.3.2",
|
|
@@ -101,5 +101,5 @@
|
|
|
101
101
|
"./scripts/jestSetup.js"
|
|
102
102
|
]
|
|
103
103
|
},
|
|
104
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "d6e4ab4c2a9ced9e5990306a538830451def9430"
|
|
105
105
|
}
|
|
@@ -227,9 +227,22 @@ export const oidcPreAuth = async (ctx: any, next: any) => {
|
|
|
227
227
|
|
|
228
228
|
setCookie(ctx, configId, Cookies.OIDC_CONFIG)
|
|
229
229
|
|
|
230
|
+
const db = getGlobalDB()
|
|
231
|
+
const config = await core.db.getScopedConfig(db, {
|
|
232
|
+
type: Configs.OIDC,
|
|
233
|
+
group: ctx.query.group,
|
|
234
|
+
})
|
|
235
|
+
|
|
236
|
+
const chosenConfig = config.configs.filter((c: any) => c.uuid === configId)[0]
|
|
237
|
+
|
|
238
|
+
let authScopes =
|
|
239
|
+
chosenConfig.scopes?.length > 0
|
|
240
|
+
? chosenConfig.scopes
|
|
241
|
+
: ["profile", "email", "offline_access"]
|
|
242
|
+
|
|
230
243
|
return passport.authenticate(strategy, {
|
|
231
244
|
// required 'openid' scope is added by oidc strategy factory
|
|
232
|
-
scope:
|
|
245
|
+
scope: authScopes,
|
|
233
246
|
})(ctx, next)
|
|
234
247
|
}
|
|
235
248
|
|