@budibase/worker 2.32.0 → 2.32.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": "2.32.
|
|
4
|
+
"version": "2.32.2",
|
|
5
5
|
"description": "Budibase background service",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"repository": {
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"author": "Budibase",
|
|
38
38
|
"license": "GPL-3.0",
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@budibase/backend-core": "2.32.
|
|
41
|
-
"@budibase/pro": "2.32.
|
|
42
|
-
"@budibase/string-templates": "2.32.
|
|
43
|
-
"@budibase/types": "2.32.
|
|
40
|
+
"@budibase/backend-core": "2.32.2",
|
|
41
|
+
"@budibase/pro": "2.32.2",
|
|
42
|
+
"@budibase/string-templates": "2.32.2",
|
|
43
|
+
"@budibase/types": "2.32.2",
|
|
44
44
|
"@koa/router": "8.0.8",
|
|
45
45
|
"@techpass/passport-openidconnect": "0.3.3",
|
|
46
46
|
"@types/global-agent": "2.1.1",
|
|
@@ -107,5 +107,5 @@
|
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
109
|
},
|
|
110
|
-
"gitHead": "
|
|
110
|
+
"gitHead": "a5b62c0a52f9637a536bbf6fd6fad8cec634deff"
|
|
111
111
|
}
|
package/src/sdk/auth/auth.ts
CHANGED
|
@@ -19,12 +19,17 @@ import { EmailTemplatePurpose } from "../../constants"
|
|
|
19
19
|
export async function loginUser(user: User) {
|
|
20
20
|
const sessionId = coreUtils.newid()
|
|
21
21
|
const tenantId = tenancy.getTenantId()
|
|
22
|
-
await sessions.createASession(user._id!, {
|
|
22
|
+
await sessions.createASession(user._id!, {
|
|
23
|
+
sessionId,
|
|
24
|
+
tenantId,
|
|
25
|
+
email: user.email,
|
|
26
|
+
})
|
|
23
27
|
return jwt.sign(
|
|
24
28
|
{
|
|
25
29
|
userId: user._id,
|
|
26
30
|
sessionId,
|
|
27
31
|
tenantId,
|
|
32
|
+
email: user.email,
|
|
28
33
|
},
|
|
29
34
|
coreEnv.JWT_SECRET!
|
|
30
35
|
)
|
|
@@ -170,19 +170,26 @@ class TestConfiguration {
|
|
|
170
170
|
async _createSession({
|
|
171
171
|
userId,
|
|
172
172
|
tenantId,
|
|
173
|
+
email,
|
|
173
174
|
}: {
|
|
174
175
|
userId: string
|
|
175
176
|
tenantId: string
|
|
177
|
+
email: string
|
|
176
178
|
}) {
|
|
177
179
|
await sessions.createASession(userId!, {
|
|
178
180
|
sessionId: "sessionid",
|
|
179
|
-
tenantId
|
|
181
|
+
tenantId,
|
|
180
182
|
csrfToken: CSRF_TOKEN,
|
|
183
|
+
email,
|
|
181
184
|
})
|
|
182
185
|
}
|
|
183
186
|
|
|
184
187
|
async createSession(user: User) {
|
|
185
|
-
return this._createSession({
|
|
188
|
+
return this._createSession({
|
|
189
|
+
userId: user._id!,
|
|
190
|
+
tenantId: user.tenantId,
|
|
191
|
+
email: user.email,
|
|
192
|
+
})
|
|
186
193
|
}
|
|
187
194
|
|
|
188
195
|
cookieHeader(cookies: any) {
|