@betterportal/auth-workos 10.1.64 → 10.1.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.
- package/lib/bp-contracts/org.betterportal.auth.workos.json +13 -3
- package/lib/plugins/service-betterportal-auth-workos/.bp-generated/registry.js +1 -1
- package/lib/plugins/service-betterportal-auth-workos/.bp-generated/registry.js.map +1 -1
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/GET.d.ts +68 -3
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/GET.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/GET.js +167 -3
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/GET.js.map +1 -1
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/_renderer.bootstrap5/GET.d.ts +1 -1
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/_renderer.bootstrap5/GET.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/_renderer.bootstrap5/_background.monitor.GET.d.ts +1 -1
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/_renderer.bootstrap5/_background.monitor.GET.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/_renderer.bootstrap5/_nav.profile.GET.d.ts +1 -1
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/_renderer.bootstrap5/_nav.profile.GET.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/index.d.ts +1 -1
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/index.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/index.js +1 -1
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/index.js.map +1 -1
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/GET.d.ts +27 -3
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/GET.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/GET.js +26 -3
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/GET.js.map +1 -1
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/index.d.ts +1 -1
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/index.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/index.js +1 -1
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/index.js.map +1 -1
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/POST.d.ts +32 -3
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/POST.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/POST.js +147 -3
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/POST.js.map +1 -1
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/index.d.ts +1 -1
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/index.d.ts.map +1 -1
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/index.js +1 -1
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/index.js.map +1 -1
- package/lib/schemas/service-betterportal-auth-workos.json +1 -1
- package/lib/schemas/service-betterportal-auth-workos.plugin.json +1 -1
- package/package.json +4 -4
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/route.impl.d.ts +0 -62
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/route.impl.d.ts.map +0 -1
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/route.impl.js +0 -165
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/route.impl.js.map +0 -1
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/route.impl.d.ts +0 -27
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/route.impl.d.ts.map +0 -1
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/route.impl.js +0 -27
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/route.impl.js.map +0 -1
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/route.impl.d.ts +0 -32
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/route.impl.d.ts.map +0 -1
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/route.impl.js +0 -148
- package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/route.impl.js.map +0 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"pluginId": "org.betterportal.auth.workos",
|
|
5
5
|
"title": "BetterPortal WorkOS",
|
|
6
6
|
"description": "WorkOS-backed auth service for BetterPortal apps.",
|
|
7
|
-
"version": "10.1.
|
|
7
|
+
"version": "10.1.65",
|
|
8
8
|
"category": "service",
|
|
9
9
|
"deploymentModes": [
|
|
10
10
|
"self-hosted"
|
|
@@ -517,8 +517,14 @@
|
|
|
517
517
|
"robots": [],
|
|
518
518
|
"role": "auth.login",
|
|
519
519
|
"dependencies": [
|
|
520
|
-
|
|
521
|
-
|
|
520
|
+
{
|
|
521
|
+
"operationId": "auth.logout",
|
|
522
|
+
"method": "GET"
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
"operationId": "auth.refresh",
|
|
526
|
+
"method": "POST"
|
|
527
|
+
}
|
|
522
528
|
],
|
|
523
529
|
"chrome": {
|
|
524
530
|
"fullScreen": true
|
|
@@ -1044,6 +1050,8 @@
|
|
|
1044
1050
|
{
|
|
1045
1051
|
"fragmentLocation": "background",
|
|
1046
1052
|
"fragmentId": "monitor",
|
|
1053
|
+
"operationId": "auth.login",
|
|
1054
|
+
"method": "GET",
|
|
1047
1055
|
"renderers": [
|
|
1048
1056
|
"bootstrap5",
|
|
1049
1057
|
"embedded"
|
|
@@ -1052,6 +1060,8 @@
|
|
|
1052
1060
|
{
|
|
1053
1061
|
"fragmentLocation": "nav",
|
|
1054
1062
|
"fragmentId": "profile",
|
|
1063
|
+
"operationId": "auth.login",
|
|
1064
|
+
"method": "GET",
|
|
1055
1065
|
"renderers": [
|
|
1056
1066
|
"bootstrap5"
|
|
1057
1067
|
]
|
|
@@ -72,7 +72,7 @@ export const registry = {
|
|
|
72
72
|
response: loginGETRoute.ResponseSchema,
|
|
73
73
|
query: loginGETRoute.QuerySchema,
|
|
74
74
|
headers: loginGETRoute.HeadersSchema
|
|
75
|
-
}, handler: loginGETRoute.default, auth: loginGETRoute.auth, cacheHints: loginGETRoute.cacheHints, demoScenarios: [], role: loginGETRoute.role, chrome: loginGETRoute.chrome, dependencies:
|
|
75
|
+
}, handler: loginGETRoute.default, auth: loginGETRoute.auth, cacheHints: loginGETRoute.cacheHints, demoScenarios: [], role: loginGETRoute.role, chrome: loginGETRoute.chrome, dependencies: loginGETRoute.dependencies } },
|
|
76
76
|
handlers: { GET: loginGETRoute.default },
|
|
77
77
|
title: loginRoute.title,
|
|
78
78
|
description: loginRoute.description,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../../src/plugins/service-betterportal-auth-workos/.bp-generated/registry.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,OAAO,KAAK,mBAAmB,MAAM,8DAA8D,CAAC;AACpG,OAAO,KAAK,sBAAsB,MAAM,4DAA4D,CAAC;AACrG,OAAO,KAAK,8BAA8B,MAAM,0EAA0E,CAAC;AAC3H,OAAO,KAAK,kCAAkC,MAAM,yEAAyE,CAAC;AAC9H,OAAO,KAAK,wBAAwB,MAAM,oEAAoE,CAAC;AAC/G,OAAO,KAAK,4BAA4B,MAAM,mEAAmE,CAAC;AAClH,OAAO,KAAK,UAAU,MAAM,6BAA6B,CAAC;AAC1D,OAAO,KAAK,aAAa,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,sBAAsB,MAAM,gDAAgD,CAAC;AACzF,OAAO,KAAK,mCAAmC,MAAM,oEAAoE,CAAC;AAC1H,OAAO,KAAK,4BAA4B,MAAM,6DAA6D,CAAC;AAC5G,OAAO,KAAK,i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AAE,IAAI,EAAE,4BAA4B,CAAC,OAAO,EAAE;YACxD,GAAG,EAAE,IAAI;YACT,KAAK,EAAE,wBAAwB,CAAC,KAAK;YACrC,WAAW,EAAE,wBAAwB,CAAC,WAAW;YACjD,SAAS,EAAE,EAAE;SACd;QACD;YACE,MAAM,EAAE,aAAa;YACrB,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,CAAC,KAAK,CAAC;YAChB,UAAU,EAAE,EAAE;YACd,OAAO,EAAE,EAAE;YACX,YAAY,EAAE,EAAE,GAAG,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,aAAa,CAAC,WAAW,EAAE,KAAK,EAAE,aAAa,CAAC,KAAK,EAAE,WAAW,EAAE,aAAa,CAAC,WAAW,EAAE,OAAO,EAAE;wBACzJ,QAAQ,EAAE,aAAa,CAAC,cAAc;wBACtC,KAAK,EAAE,aAAa,CAAC,WAAW;wBAChC,OAAO,EAAE,aAAa,CAAC,aAAa;qBACrC,EAAE,OAAO,EAAE,aAAa,CAAC,OAAO,EAAE,IAAI,EAAE,aAAa,CAAC,IAAI,EAAE,UAAU,EAAE,aAAa,CAAC,UAAU,EAAE,aAAa,EAAE,EAAE,EAAE,IAAI,EAAE,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,CAAC,MAAM,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../../../src/plugins/service-betterportal-auth-workos/.bp-generated/registry.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,OAAO,KAAK,mBAAmB,MAAM,8DAA8D,CAAC;AACpG,OAAO,KAAK,sBAAsB,MAAM,4DAA4D,CAAC;AACrG,OAAO,KAAK,8BAA8B,MAAM,0EAA0E,CAAC;AAC3H,OAAO,KAAK,kCAAkC,MAAM,yEAAyE,CAAC;AAC9H,OAAO,KAAK,wBAAwB,MAAM,oEAAoE,CAAC;AAC/G,OAAO,KAAK,4BAA4B,MAAM,mEAAm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;KACF;IACD,cAAc,EAAE,EACf;CACF,CAAC"}
|
|
@@ -1,5 +1,70 @@
|
|
|
1
1
|
export declare const operationId = "auth.login";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import * as av from "anyvali";
|
|
3
|
+
import type { Infer } from "anyvali";
|
|
4
|
+
import { type ApiAuthRequirement, type BetterPortalRouteChrome, type CacheHints } from "@betterportal/framework";
|
|
5
|
+
export declare const QuerySchema: av.ObjectSchema<{
|
|
6
|
+
action: av.OptionalSchema<av.StringSchema>;
|
|
7
|
+
code: av.OptionalSchema<av.StringSchema>;
|
|
8
|
+
state: av.OptionalSchema<av.StringSchema>;
|
|
9
|
+
next: av.OptionalSchema<av.StringSchema>;
|
|
10
|
+
redirect: av.OptionalSchema<av.StringSchema>;
|
|
11
|
+
error: av.OptionalSchema<av.StringSchema>;
|
|
12
|
+
error_description: av.OptionalSchema<av.StringSchema>;
|
|
13
|
+
}>;
|
|
14
|
+
export declare const HeadersSchema: av.ObjectSchema<{}>;
|
|
15
|
+
export declare const ResponseSchema: av.ObjectSchema<{
|
|
16
|
+
status: av.EnumSchema<readonly ["ok", "error"]>;
|
|
17
|
+
message: av.OptionalSchema<av.StringSchema>;
|
|
18
|
+
authorizationUrl: av.OptionalSchema<av.StringSchema>;
|
|
19
|
+
loginUI: av.EnumSchema<readonly ["default", "clean", "redirect"]>;
|
|
20
|
+
alreadyLoggedIn: av.OptionalSchema<av.BoolSchema>;
|
|
21
|
+
loggedOut: av.OptionalSchema<av.BoolSchema>;
|
|
22
|
+
signedIn: av.OptionalSchema<av.BoolSchema>;
|
|
23
|
+
nextUrl: av.OptionalSchema<av.StringSchema>;
|
|
24
|
+
user: av.OptionalSchema<av.ObjectSchema<{
|
|
25
|
+
id: av.OptionalSchema<av.StringSchema>;
|
|
26
|
+
name: av.OptionalSchema<av.StringSchema>;
|
|
27
|
+
email: av.OptionalSchema<av.StringSchema>;
|
|
28
|
+
picture: av.OptionalSchema<av.StringSchema>;
|
|
29
|
+
}>>;
|
|
30
|
+
}>;
|
|
31
|
+
export type ResponseData = Infer<typeof ResponseSchema>;
|
|
32
|
+
export declare const title = "WorkOS Login";
|
|
33
|
+
export declare const description = "Authenticate with WorkOS AuthKit and store BetterPortal auth headers.";
|
|
34
|
+
export declare const role = "auth.login";
|
|
35
|
+
export declare const dependencies: readonly [{
|
|
36
|
+
readonly operationId: "auth.logout";
|
|
37
|
+
readonly method: "GET";
|
|
38
|
+
}, {
|
|
39
|
+
readonly operationId: "auth.refresh";
|
|
40
|
+
readonly method: "POST";
|
|
41
|
+
}];
|
|
42
|
+
export declare const chrome: BetterPortalRouteChrome;
|
|
43
|
+
export declare const auth: ApiAuthRequirement;
|
|
44
|
+
export declare const cacheHints: CacheHints;
|
|
45
|
+
declare const _default: import("@betterportal/framework").RouteHandler<Record<string, string>, {
|
|
46
|
+
action?: string | undefined;
|
|
47
|
+
code?: string | undefined;
|
|
48
|
+
state?: string | undefined;
|
|
49
|
+
next?: string | undefined;
|
|
50
|
+
redirect?: string | undefined;
|
|
51
|
+
error?: string | undefined;
|
|
52
|
+
error_description?: string | undefined;
|
|
53
|
+
}, {}, Record<string, unknown>, {
|
|
54
|
+
status: "error" | "ok";
|
|
55
|
+
loginUI: "redirect" | "default" | "clean";
|
|
56
|
+
message?: string | undefined;
|
|
57
|
+
authorizationUrl?: string | undefined;
|
|
58
|
+
alreadyLoggedIn?: boolean | undefined;
|
|
59
|
+
loggedOut?: boolean | undefined;
|
|
60
|
+
signedIn?: boolean | undefined;
|
|
61
|
+
nextUrl?: string | undefined;
|
|
62
|
+
user?: {
|
|
63
|
+
id?: string | undefined;
|
|
64
|
+
name?: string | undefined;
|
|
65
|
+
email?: string | undefined;
|
|
66
|
+
picture?: string | undefined;
|
|
67
|
+
} | undefined;
|
|
68
|
+
}, unknown, Record<string, unknown>>;
|
|
69
|
+
export default _default;
|
|
5
70
|
//# sourceMappingURL=GET.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GET.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-workos/bp-routes/login/GET.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,eAAe,CAAC;AACxC,OAAO,
|
|
1
|
+
{"version":3,"file":"GET.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-workos/bp-routes/login/GET.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,eAAe,CAAC;AACxC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAGL,KAAK,kBAAkB,EACvB,KAAK,uBAAuB,EAC5B,KAAK,UAAU,EAChB,MAAM,yBAAyB,CAAC;AAOjC,eAAO,MAAM,WAAW;;;;;;;;EAQtB,CAAC;AAEH,eAAO,MAAM,aAAa,qBAAgB,CAAC;AAE3C,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;EAezB,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAExD,eAAO,MAAM,KAAK,iBAAiB,CAAC;AACpC,eAAO,MAAM,WAAW,0EAA0E,CAAC;AACnG,eAAO,MAAM,IAAI,eAAe,CAAC;AACjC,eAAO,MAAM,YAAY;;;;;;EAGf,CAAC;AACX,eAAO,MAAM,MAAM,EAAE,uBAA8C,CAAC;AACpE,eAAO,MAAM,IAAI,EAAE,kBAAyD,CAAC;AAC7E,eAAO,MAAM,UAAU,EAAE,UAA0C,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;AAYpE,wBA2HE"}
|
|
@@ -1,5 +1,169 @@
|
|
|
1
1
|
export const operationId = "auth.login";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import * as av from "anyvali";
|
|
3
|
+
import { createHandler, resolveAppAuthRedirect } from "@betterportal/framework";
|
|
4
|
+
import { resolveWorkOSAppConfig, workOSAccessTokenDetails } from "../../index.js";
|
|
5
|
+
export const QuerySchema = av.object({
|
|
6
|
+
action: av.optional(av.string()),
|
|
7
|
+
code: av.optional(av.string()),
|
|
8
|
+
state: av.optional(av.string()),
|
|
9
|
+
next: av.optional(av.string()),
|
|
10
|
+
redirect: av.optional(av.string()),
|
|
11
|
+
error: av.optional(av.string()),
|
|
12
|
+
error_description: av.optional(av.string())
|
|
13
|
+
});
|
|
14
|
+
export const HeadersSchema = av.object({});
|
|
15
|
+
export const ResponseSchema = av.object({
|
|
16
|
+
status: av.enum_(["ok", "error"]),
|
|
17
|
+
message: av.optional(av.string()),
|
|
18
|
+
authorizationUrl: av.optional(av.string()),
|
|
19
|
+
loginUI: av.enum_(["default", "clean", "redirect"]).default("default"),
|
|
20
|
+
alreadyLoggedIn: av.optional(av.bool()),
|
|
21
|
+
loggedOut: av.optional(av.bool()),
|
|
22
|
+
signedIn: av.optional(av.bool()),
|
|
23
|
+
nextUrl: av.optional(av.string()),
|
|
24
|
+
user: av.optional(av.object({
|
|
25
|
+
id: av.optional(av.string()),
|
|
26
|
+
name: av.optional(av.string()),
|
|
27
|
+
email: av.optional(av.string()),
|
|
28
|
+
picture: av.optional(av.string())
|
|
29
|
+
}))
|
|
30
|
+
});
|
|
31
|
+
export const title = "WorkOS Login";
|
|
32
|
+
export const description = "Authenticate with WorkOS AuthKit and store BetterPortal auth headers.";
|
|
33
|
+
export const role = "auth.login";
|
|
34
|
+
export const dependencies = [
|
|
35
|
+
{ operationId: "auth.logout", method: "GET" },
|
|
36
|
+
{ operationId: "auth.refresh", method: "POST" }
|
|
37
|
+
];
|
|
38
|
+
export const chrome = { fullScreen: true };
|
|
39
|
+
export const auth = { required: false, permissions: [] };
|
|
40
|
+
export const cacheHints = { ttlSeconds: 0, varyBy: [] };
|
|
41
|
+
function pluginFrom(ctx) {
|
|
42
|
+
const plugin = ctx.plugin;
|
|
43
|
+
if (!plugin)
|
|
44
|
+
throw new Error("WorkOS plugin not available on handler context");
|
|
45
|
+
return plugin;
|
|
46
|
+
}
|
|
47
|
+
function firstString(...values) {
|
|
48
|
+
return values.find((value) => typeof value === "string" && value.trim().length > 0)?.trim();
|
|
49
|
+
}
|
|
50
|
+
export default createHandler({ response: ResponseSchema, query: QuerySchema, headers: HeadersSchema }, async (ctx) => {
|
|
51
|
+
const query = ctx.query;
|
|
52
|
+
const config = resolveWorkOSAppConfig(ctx.config);
|
|
53
|
+
const nextUrl = resolveAppAuthRedirect(ctx, "afterLogin", query.state ?? query.next ?? query.redirect);
|
|
54
|
+
if (query.action === "logout") {
|
|
55
|
+
ctx.bpHeaders?.remove("Authorization");
|
|
56
|
+
ctx.bpHeaders?.remove("X-BP-Refresh");
|
|
57
|
+
if (ctx.serviceId)
|
|
58
|
+
ctx.responseHeaders?.set("HX-Trigger", `bp:fragments:${ctx.serviceId}`);
|
|
59
|
+
return {
|
|
60
|
+
status: "ok",
|
|
61
|
+
message: "Signed out.",
|
|
62
|
+
loginUI: config?.loginUI ?? "default",
|
|
63
|
+
loggedOut: true,
|
|
64
|
+
nextUrl: resolveAppAuthRedirect(ctx, "afterLogout")
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
if (!config) {
|
|
68
|
+
return { status: "error", message: "WorkOS config is missing clientId or apiKey.", loginUI: "default", nextUrl };
|
|
69
|
+
}
|
|
70
|
+
if (query.error) {
|
|
71
|
+
return {
|
|
72
|
+
status: "error",
|
|
73
|
+
message: query.error_description || query.error,
|
|
74
|
+
loginUI: config.loginUI ?? "default",
|
|
75
|
+
nextUrl
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
if (query.code) {
|
|
79
|
+
try {
|
|
80
|
+
const auth = await pluginFrom(ctx).authenticateWithCode(config, query.code);
|
|
81
|
+
const details = workOSAccessTokenDetails(auth.accessToken, config.roleClaimPath ?? "roles");
|
|
82
|
+
if (!details)
|
|
83
|
+
throw new Error("WorkOS access token is missing its session id.");
|
|
84
|
+
if (auth.organizationId && details.organizationId && auth.organizationId !== details.organizationId) {
|
|
85
|
+
throw new Error("WorkOS organization does not match the access token.");
|
|
86
|
+
}
|
|
87
|
+
const organizationId = auth.organizationId ?? details.organizationId;
|
|
88
|
+
const issued = pluginFrom(ctx).issueTokenPair({
|
|
89
|
+
sub: auth.user.id,
|
|
90
|
+
tenantId: ctx.tenant.id,
|
|
91
|
+
appId: ctx.app.id,
|
|
92
|
+
roles: details.roles,
|
|
93
|
+
authProvider: "workos",
|
|
94
|
+
refreshContext: {
|
|
95
|
+
providerToken: auth.refreshToken,
|
|
96
|
+
sessionId: details.sessionId,
|
|
97
|
+
...(organizationId ? { organizationId } : {})
|
|
98
|
+
},
|
|
99
|
+
providerSubject: auth.user.id,
|
|
100
|
+
provider: {
|
|
101
|
+
accountId: auth.user.id,
|
|
102
|
+
scope: organizationId ? `organization:${organizationId}` : undefined
|
|
103
|
+
},
|
|
104
|
+
name: firstString(auth.user.name, [auth.user.firstName, auth.user.lastName].filter(Boolean).join(" ")),
|
|
105
|
+
email: auth.user.email,
|
|
106
|
+
picture: auth.user.profilePictureUrl ?? undefined
|
|
107
|
+
});
|
|
108
|
+
if (!issued.refreshToken)
|
|
109
|
+
throw new Error("Auth token issuer did not return a refresh token");
|
|
110
|
+
ctx.bpHeaders?.set("Authorization", `Bearer ${issued.accessToken}`, {
|
|
111
|
+
locked: true,
|
|
112
|
+
expiresInSeconds: issued.accessTokenExpiresInSeconds,
|
|
113
|
+
refreshPath: "/refresh",
|
|
114
|
+
refreshBeforeSeconds: 60
|
|
115
|
+
});
|
|
116
|
+
ctx.bpHeaders?.set("X-BP-Refresh", issued.refreshToken, {
|
|
117
|
+
locked: true,
|
|
118
|
+
scopeToOwner: true,
|
|
119
|
+
expiresInSeconds: issued.refreshTokenExpiresInSeconds
|
|
120
|
+
});
|
|
121
|
+
ctx.responseHeaders?.set("HX-Redirect", nextUrl);
|
|
122
|
+
if (ctx.serviceId)
|
|
123
|
+
ctx.responseHeaders?.set("HX-Trigger", `bp:fragments:${ctx.serviceId}`);
|
|
124
|
+
return {
|
|
125
|
+
status: "ok",
|
|
126
|
+
message: "Signed in.",
|
|
127
|
+
loginUI: config.loginUI ?? "default",
|
|
128
|
+
signedIn: true,
|
|
129
|
+
nextUrl,
|
|
130
|
+
user: {
|
|
131
|
+
id: auth.user.id,
|
|
132
|
+
name: firstString(auth.user.name, [auth.user.firstName, auth.user.lastName].filter(Boolean).join(" ")),
|
|
133
|
+
email: auth.user.email,
|
|
134
|
+
picture: auth.user.profilePictureUrl ?? undefined
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
catch (error) {
|
|
139
|
+
ctx.obs?.error(error);
|
|
140
|
+
return { status: "error", message: `WorkOS sign in failed: ${error.message}`, loginUI: config.loginUI ?? "default", nextUrl };
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
if (ctx.user) {
|
|
144
|
+
return {
|
|
145
|
+
status: "ok",
|
|
146
|
+
message: "Already signed in.",
|
|
147
|
+
loginUI: config.loginUI ?? "default",
|
|
148
|
+
alreadyLoggedIn: true,
|
|
149
|
+
nextUrl,
|
|
150
|
+
user: {
|
|
151
|
+
id: ctx.user.sub,
|
|
152
|
+
name: ctx.user.name,
|
|
153
|
+
email: ctx.user.email,
|
|
154
|
+
picture: ctx.user.picture
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
const redirectUri = ctx.uiRouteUrl?.("login.index", { absolute: true }) ??
|
|
159
|
+
ctx.routeUrl?.("login.index", { absolute: true }) ??
|
|
160
|
+
"/login";
|
|
161
|
+
return {
|
|
162
|
+
status: "ok",
|
|
163
|
+
message: "Continue to WorkOS.",
|
|
164
|
+
loginUI: config.loginUI ?? "default",
|
|
165
|
+
authorizationUrl: pluginFrom(ctx).getAuthorizationUrl(config, { redirectUri, state: nextUrl }),
|
|
166
|
+
nextUrl
|
|
167
|
+
};
|
|
168
|
+
});
|
|
5
169
|
//# sourceMappingURL=GET.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GET.js","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-workos/bp-routes/login/GET.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"GET.js","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-workos/bp-routes/login/GET.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAC;AACxC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAE9B,OAAO,EACL,aAAa,EACb,sBAAsB,EAIvB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,gBAAgB,CAAC;AAExB,MAAM,CAAC,MAAM,WAAW,GAAG,EAAE,CAAC,MAAM,CAAC;IACnC,MAAM,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC;IAChC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC;IAC9B,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC;IAC/B,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC;IAC9B,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC;IAClC,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC;IAC/B,iBAAiB,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC;CAC5C,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,aAAa,GAAG,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAE3C,MAAM,CAAC,MAAM,cA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,MAAM,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;QAC9F,OAAO;KACR,CAAC;AACJ,CAAC,CACF,CAAC"}
|
package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/_renderer.bootstrap5/GET.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsxImportSource jsx-htmx */
|
|
2
2
|
import type { HtmlRenderable } from "@betterportal/framework";
|
|
3
|
-
import type { ResponseData } from "../
|
|
3
|
+
import type { ResponseData } from "../GET.js";
|
|
4
4
|
export declare function render(data: ResponseData): HtmlRenderable;
|
|
5
5
|
//# sourceMappingURL=GET.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GET.d.ts","sourceRoot":"","sources":["../../../../../../src/plugins/service-betterportal-auth-workos/bp-routes/login/_renderer.bootstrap5/GET.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"GET.d.ts","sourceRoot":"","sources":["../../../../../../src/plugins/service-betterportal-auth-workos/bp-routes/login/_renderer.bootstrap5/GET.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C,wBAAgB,MAAM,CAAC,IAAI,EAAE,YAAY,GAAG,cAAc,CAkGzD"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsxImportSource jsx-htmx */
|
|
2
2
|
import type { HtmlRenderable } from "@betterportal/framework";
|
|
3
|
-
import type { ResponseData } from "../
|
|
3
|
+
import type { ResponseData } from "../GET.js";
|
|
4
4
|
export declare function render(_data: ResponseData): HtmlRenderable;
|
|
5
5
|
//# sourceMappingURL=_background.monitor.GET.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_background.monitor.GET.d.ts","sourceRoot":"","sources":["../../../../../../src/plugins/service-betterportal-auth-workos/bp-routes/login/_renderer.bootstrap5/_background.monitor.GET.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"_background.monitor.GET.d.ts","sourceRoot":"","sources":["../../../../../../src/plugins/service-betterportal-auth-workos/bp-routes/login/_renderer.bootstrap5/_background.monitor.GET.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C,wBAAgB,MAAM,CAAC,KAAK,EAAE,YAAY,GAAG,cAAc,CAE1D"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @jsxImportSource jsx-htmx */
|
|
2
2
|
import type { HtmlRenderable } from "@betterportal/framework";
|
|
3
|
-
import type { ResponseData } from "../
|
|
3
|
+
import type { ResponseData } from "../GET.js";
|
|
4
4
|
export declare function render(data: ResponseData): HtmlRenderable;
|
|
5
5
|
//# sourceMappingURL=_nav.profile.GET.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_nav.profile.GET.d.ts","sourceRoot":"","sources":["../../../../../../src/plugins/service-betterportal-auth-workos/bp-routes/login/_renderer.bootstrap5/_nav.profile.GET.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"_nav.profile.GET.d.ts","sourceRoot":"","sources":["../../../../../../src/plugins/service-betterportal-auth-workos/bp-routes/login/_renderer.bootstrap5/_nav.profile.GET.tsx"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C,wBAAgB,MAAM,CAAC,IAAI,EAAE,YAAY,GAAG,cAAc,CA4BzD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { title, description } from "./
|
|
1
|
+
export { title, description } from "./GET.js";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-workos/bp-routes/login/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-workos/bp-routes/login/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { title, description } from "./
|
|
1
|
+
export { title, description } from "./GET.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-workos/bp-routes/login/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-workos/bp-routes/login/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
export declare const operationId = "auth.logout";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import * as av from "anyvali";
|
|
3
|
+
import type { Infer } from "anyvali";
|
|
4
|
+
import { type ApiAuthRequirement, type CacheHints } from "@betterportal/framework";
|
|
5
|
+
export declare const QuerySchema: av.ObjectSchema<{
|
|
6
|
+
next: av.OptionalSchema<av.StringSchema>;
|
|
7
|
+
redirect: av.OptionalSchema<av.StringSchema>;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const ResponseSchema: av.ObjectSchema<{
|
|
10
|
+
status: av.EnumSchema<readonly ["ok"]>;
|
|
11
|
+
message: av.StringSchema;
|
|
12
|
+
nextUrl: av.StringSchema;
|
|
13
|
+
}>;
|
|
14
|
+
export type ResponseData = Infer<typeof ResponseSchema>;
|
|
15
|
+
export declare const title = "WorkOS Logout";
|
|
16
|
+
export declare const description = "Clear the stored WorkOS bearer token.";
|
|
17
|
+
export declare const role = "auth.logout";
|
|
18
|
+
export declare const auth: ApiAuthRequirement;
|
|
19
|
+
export declare const cacheHints: CacheHints;
|
|
20
|
+
declare const _default: import("@betterportal/framework").RouteHandler<Record<string, string>, {
|
|
21
|
+
next?: string | undefined;
|
|
22
|
+
redirect?: string | undefined;
|
|
23
|
+
}, Record<string, string>, Record<string, unknown>, {
|
|
24
|
+
status: "ok";
|
|
25
|
+
message: string;
|
|
26
|
+
nextUrl: string;
|
|
27
|
+
}, unknown, Record<string, unknown>>;
|
|
28
|
+
export default _default;
|
|
5
29
|
//# sourceMappingURL=GET.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GET.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-workos/bp-routes/logout/GET.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,OAAO,
|
|
1
|
+
{"version":3,"file":"GET.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-workos/bp-routes/logout/GET.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAyC,KAAK,kBAAkB,EAAE,KAAK,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE1H,eAAO,MAAM,WAAW;;;EAGtB,CAAC;AAEH,eAAO,MAAM,cAAc;;;;EAIzB,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAExD,eAAO,MAAM,KAAK,kBAAkB,CAAC;AACrC,eAAO,MAAM,WAAW,0CAA0C,CAAC;AACnE,eAAO,MAAM,IAAI,gBAAgB,CAAC;AAClC,eAAO,MAAM,IAAI,EAAE,kBAAyD,CAAC;AAC7E,eAAO,MAAM,UAAU,EAAE,UAA0C,CAAC;;;;;;;;;AAEpE,wBAWE"}
|
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
export const operationId = "auth.logout";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export
|
|
2
|
+
import * as av from "anyvali";
|
|
3
|
+
import { createHandler, resolveAppAuthRedirect } from "@betterportal/framework";
|
|
4
|
+
export const QuerySchema = av.object({
|
|
5
|
+
next: av.optional(av.string()),
|
|
6
|
+
redirect: av.optional(av.string())
|
|
7
|
+
});
|
|
8
|
+
export const ResponseSchema = av.object({
|
|
9
|
+
status: av.enum_(["ok"]),
|
|
10
|
+
message: av.string(),
|
|
11
|
+
nextUrl: av.string()
|
|
12
|
+
});
|
|
13
|
+
export const title = "WorkOS Logout";
|
|
14
|
+
export const description = "Clear the stored WorkOS bearer token.";
|
|
15
|
+
export const role = "auth.logout";
|
|
16
|
+
export const auth = { required: false, permissions: [] };
|
|
17
|
+
export const cacheHints = { ttlSeconds: 0, varyBy: [] };
|
|
18
|
+
export default createHandler({ response: ResponseSchema, query: QuerySchema }, (ctx) => {
|
|
19
|
+
const query = ctx.query;
|
|
20
|
+
const nextUrl = resolveAppAuthRedirect(ctx, "afterLogout", query.next ?? query.redirect);
|
|
21
|
+
ctx.bpHeaders?.remove("Authorization");
|
|
22
|
+
ctx.bpHeaders?.remove("X-BP-Refresh");
|
|
23
|
+
ctx.responseHeaders?.set("HX-Location", "/login?action=logout");
|
|
24
|
+
if (ctx.serviceId)
|
|
25
|
+
ctx.responseHeaders?.set("HX-Trigger", `bp:fragments:${ctx.serviceId}`);
|
|
26
|
+
return { status: "ok", message: "Signed out.", nextUrl };
|
|
27
|
+
});
|
|
5
28
|
//# sourceMappingURL=GET.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GET.js","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-workos/bp-routes/logout/GET.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAC;AACzC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"GET.js","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-workos/bp-routes/logout/GET.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAC;AACzC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAE9B,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAA4C,MAAM,yBAAyB,CAAC;AAE1H,MAAM,CAAC,MAAM,WAAW,GAAG,EAAE,CAAC,MAAM,CAAC;IACnC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC;IAC9B,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC;CACnC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,CAAC,MAAM,CAAC;IACtC,MAAM,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,IAAI,CAAU,CAAC;IACjC,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|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-workos/bp-routes/logout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-workos/bp-routes/logout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { title, description } from "./
|
|
1
|
+
export { title, description } from "./GET.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-workos/bp-routes/logout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-workos/bp-routes/logout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
export declare const operationId = "auth.refresh";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import * as av from "anyvali";
|
|
3
|
+
import type { Infer } from "anyvali";
|
|
4
|
+
import { type ApiAuthRequirement, type CacheHints } from "@betterportal/framework";
|
|
5
|
+
export declare const HeadersSchema: av.ObjectSchema<{
|
|
6
|
+
"x-bp-refresh": av.OptionalSchema<av.StringSchema>;
|
|
7
|
+
}>;
|
|
8
|
+
export declare const RequestSchema: av.ObjectSchema<{
|
|
9
|
+
refreshToken: av.OptionalSchema<av.StringSchema>;
|
|
10
|
+
}>;
|
|
11
|
+
export declare const ResponseSchema: av.ObjectSchema<{
|
|
12
|
+
status: av.EnumSchema<readonly ["ok", "error"]>;
|
|
13
|
+
message: av.OptionalSchema<av.StringSchema>;
|
|
14
|
+
accessToken: av.OptionalSchema<av.StringSchema>;
|
|
15
|
+
expiresInSeconds: av.OptionalSchema<av.IntSchema>;
|
|
16
|
+
}>;
|
|
17
|
+
export type ResponseData = Infer<typeof ResponseSchema>;
|
|
18
|
+
export declare const title = "WorkOS Refresh";
|
|
19
|
+
export declare const description = "Refresh BetterPortal tokens using a WorkOS-backed BP refresh token.";
|
|
20
|
+
export declare const role = "auth.refresh";
|
|
21
|
+
export declare const auth: ApiAuthRequirement;
|
|
22
|
+
export declare const cacheHints: CacheHints;
|
|
23
|
+
declare const _default: import("@betterportal/framework").RouteHandler<Record<string, string>, Record<string, unknown>, {
|
|
24
|
+
"x-bp-refresh"?: string | undefined;
|
|
25
|
+
}, {
|
|
26
|
+
refreshToken?: string | undefined;
|
|
27
|
+
}, {
|
|
28
|
+
status: "error" | "ok";
|
|
29
|
+
message?: string | undefined;
|
|
30
|
+
accessToken?: string | undefined;
|
|
31
|
+
expiresInSeconds?: number | undefined;
|
|
32
|
+
}, unknown, Record<string, unknown>>;
|
|
33
|
+
export default _default;
|
|
5
34
|
//# sourceMappingURL=POST.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"POST.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-workos/bp-routes/refresh/POST.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,iBAAiB,CAAC;AAC1C,OAAO,
|
|
1
|
+
{"version":3,"file":"POST.d.ts","sourceRoot":"","sources":["../../../../../src/plugins/service-betterportal-auth-workos/bp-routes/refresh/POST.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,iBAAiB,CAAC;AAC1C,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAEL,KAAK,kBAAkB,EACvB,KAAK,UAAU,EAChB,MAAM,yBAAyB,CAAC;AAQjC,eAAO,MAAM,aAAa;;EAExB,CAAC;AAEH,eAAO,MAAM,aAAa;;EAExB,CAAC;AAEH,eAAO,MAAM,cAAc;;;;;EAKzB,CAAC;AACH,MAAM,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAExD,eAAO,MAAM,KAAK,mBAAmB,CAAC;AACtC,eAAO,MAAM,WAAW,wEAAwE,CAAC;AACjG,eAAO,MAAM,IAAI,iBAAiB,CAAC;AACnC,eAAO,MAAM,IAAI,EAAE,kBAAyD,CAAC;AAC7E,eAAO,MAAM,UAAU,EAAE,UAA0C,CAAC;;;;;;;;;;;AAapE,wBAyHE"}
|