@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.
Files changed (48) hide show
  1. package/lib/bp-contracts/org.betterportal.auth.workos.json +13 -3
  2. package/lib/plugins/service-betterportal-auth-workos/.bp-generated/registry.js +1 -1
  3. package/lib/plugins/service-betterportal-auth-workos/.bp-generated/registry.js.map +1 -1
  4. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/GET.d.ts +68 -3
  5. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/GET.d.ts.map +1 -1
  6. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/GET.js +167 -3
  7. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/GET.js.map +1 -1
  8. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/_renderer.bootstrap5/GET.d.ts +1 -1
  9. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/_renderer.bootstrap5/GET.d.ts.map +1 -1
  10. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/_renderer.bootstrap5/_background.monitor.GET.d.ts +1 -1
  11. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/_renderer.bootstrap5/_background.monitor.GET.d.ts.map +1 -1
  12. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/_renderer.bootstrap5/_nav.profile.GET.d.ts +1 -1
  13. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/_renderer.bootstrap5/_nav.profile.GET.d.ts.map +1 -1
  14. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/index.d.ts +1 -1
  15. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/index.d.ts.map +1 -1
  16. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/index.js +1 -1
  17. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/index.js.map +1 -1
  18. package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/GET.d.ts +27 -3
  19. package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/GET.d.ts.map +1 -1
  20. package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/GET.js +26 -3
  21. package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/GET.js.map +1 -1
  22. package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/index.d.ts +1 -1
  23. package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/index.d.ts.map +1 -1
  24. package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/index.js +1 -1
  25. package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/index.js.map +1 -1
  26. package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/POST.d.ts +32 -3
  27. package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/POST.d.ts.map +1 -1
  28. package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/POST.js +147 -3
  29. package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/POST.js.map +1 -1
  30. package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/index.d.ts +1 -1
  31. package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/index.d.ts.map +1 -1
  32. package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/index.js +1 -1
  33. package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/index.js.map +1 -1
  34. package/lib/schemas/service-betterportal-auth-workos.json +1 -1
  35. package/lib/schemas/service-betterportal-auth-workos.plugin.json +1 -1
  36. package/package.json +4 -4
  37. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/route.impl.d.ts +0 -62
  38. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/route.impl.d.ts.map +0 -1
  39. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/route.impl.js +0 -165
  40. package/lib/plugins/service-betterportal-auth-workos/bp-routes/login/route.impl.js.map +0 -1
  41. package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/route.impl.d.ts +0 -27
  42. package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/route.impl.d.ts.map +0 -1
  43. package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/route.impl.js +0 -27
  44. package/lib/plugins/service-betterportal-auth-workos/bp-routes/logout/route.impl.js.map +0 -1
  45. package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/route.impl.d.ts +0 -32
  46. package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/route.impl.d.ts.map +0 -1
  47. package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/route.impl.js +0 -148
  48. package/lib/plugins/service-betterportal-auth-workos/bp-routes/refresh/route.impl.js.map +0 -1
@@ -1,148 +0,0 @@
1
- import * as av from "anyvali";
2
- import { createHandler } from "@betterportal/framework";
3
- import { resolveWorkOSAppConfig, workOSAccessTokenDetails, WorkOSRefreshContextSchema } from "../../index.js";
4
- export const HeadersSchema = av.object({
5
- "x-bp-refresh": av.optional(av.string())
6
- });
7
- export const RequestSchema = av.object({
8
- refreshToken: av.optional(av.string().minLength(1))
9
- });
10
- export const ResponseSchema = av.object({
11
- status: av.enum_(["ok", "error"]),
12
- message: av.optional(av.string()),
13
- accessToken: av.optional(av.string()),
14
- expiresInSeconds: av.optional(av.int().min(1))
15
- });
16
- export const title = "WorkOS Refresh";
17
- export const description = "Refresh BetterPortal tokens using a WorkOS-backed BP refresh token.";
18
- export const role = "auth.refresh";
19
- export const auth = { required: false, permissions: [] };
20
- export const cacheHints = { ttlSeconds: 0, varyBy: [] };
21
- function pluginFrom(ctx) {
22
- const plugin = ctx.plugin;
23
- if (!plugin)
24
- throw new Error("WorkOS plugin not available on handler context");
25
- return plugin;
26
- }
27
- function clearAuth(ctx) {
28
- ctx.bpHeaders?.remove("Authorization");
29
- ctx.bpHeaders?.remove("X-BP-Refresh");
30
- }
31
- export const handlePost = createHandler({ response: ResponseSchema, request: RequestSchema, headers: HeadersSchema }, async (ctx) => {
32
- const config = resolveWorkOSAppConfig(ctx.config);
33
- if (!config) {
34
- ctx.setStatus?.(503);
35
- return { status: "error", message: "WorkOS config is missing clientId or apiKey." };
36
- }
37
- const body = ctx.request;
38
- const headers = ctx.headers;
39
- const refreshToken = body.refreshToken ?? headers["x-bp-refresh"];
40
- if (!refreshToken?.trim()) {
41
- ctx.setStatus?.(401);
42
- clearAuth(ctx);
43
- return { status: "error", message: "Refresh token is required." };
44
- }
45
- const plugin = pluginFrom(ctx);
46
- let claims;
47
- try {
48
- claims = await plugin.verifyRefreshToken({ refreshToken, tenantId: ctx.tenant.id, appId: ctx.app.id });
49
- }
50
- catch {
51
- ctx.setStatus?.(401);
52
- clearAuth(ctx);
53
- return { status: "error", message: "Refresh token invalid or expired." };
54
- }
55
- let refreshContext;
56
- try {
57
- if (claims.authProvider !== "workos" || claims.providerSubject !== claims.sub)
58
- throw new Error("Wrong auth provider");
59
- refreshContext = WorkOSRefreshContextSchema.parse(claims.refreshContext);
60
- }
61
- catch {
62
- ctx.setStatus?.(401);
63
- clearAuth(ctx);
64
- return { status: "error", message: "Refresh token belongs to a different auth provider." };
65
- }
66
- let state;
67
- try {
68
- state = await plugin.getWorkOSSessionState(config, {
69
- userId: claims.sub,
70
- sessionId: refreshContext.sessionId,
71
- organizationId: refreshContext.organizationId
72
- });
73
- }
74
- catch (error) {
75
- ctx.obs?.error(error);
76
- ctx.setStatus?.(502);
77
- return { status: "error", message: "WorkOS session lookup failed." };
78
- }
79
- if (!state.sessionActive || !state.membershipActive) {
80
- ctx.setStatus?.(401);
81
- clearAuth(ctx);
82
- return { status: "error", message: "WorkOS session or organization membership is inactive." };
83
- }
84
- let workosAuth;
85
- try {
86
- workosAuth = await plugin.refreshWorkOSToken(config, refreshContext.providerToken, refreshContext.organizationId);
87
- }
88
- catch (error) {
89
- ctx.obs?.error(error);
90
- const status = [400, 401, 403, 404, 422].includes(error?.status) ? 401 : 502;
91
- ctx.setStatus?.(status);
92
- if (status === 401)
93
- clearAuth(ctx);
94
- return {
95
- status: "error",
96
- message: status === 401 ? "WorkOS refresh token invalid, expired, or revoked." : "WorkOS token refresh failed."
97
- };
98
- }
99
- const details = workOSAccessTokenDetails(workosAuth.accessToken, config.roleClaimPath ?? "roles");
100
- if (!details
101
- || workosAuth.user.id !== claims.sub
102
- || details.sessionId !== refreshContext.sessionId
103
- || (details.organizationId ?? "") !== (refreshContext.organizationId ?? "")
104
- || (workosAuth.organizationId ?? details.organizationId ?? "") !== (refreshContext.organizationId ?? "")) {
105
- ctx.setStatus?.(401);
106
- clearAuth(ctx);
107
- return { status: "error", message: "WorkOS refreshed identity does not match the original session." };
108
- }
109
- const issued = plugin.issueTokenPair({
110
- sub: workosAuth.user.id,
111
- tenantId: ctx.tenant.id,
112
- appId: ctx.app.id,
113
- roles: details.roles,
114
- authProvider: "workos",
115
- refreshContext: {
116
- providerToken: workosAuth.refreshToken,
117
- sessionId: details.sessionId,
118
- ...(details.organizationId ? { organizationId: details.organizationId } : {})
119
- },
120
- providerSubject: workosAuth.user.id,
121
- provider: {
122
- accountId: workosAuth.user.id,
123
- scope: details.organizationId ? `organization:${details.organizationId}` : undefined
124
- },
125
- name: workosAuth.user.name ?? undefined,
126
- email: workosAuth.user.email,
127
- picture: workosAuth.user.profilePictureUrl ?? undefined
128
- });
129
- if (!issued.refreshToken)
130
- throw new Error("Auth token issuer did not return a refresh token");
131
- ctx.bpHeaders?.set("Authorization", `Bearer ${issued.accessToken}`, {
132
- locked: true,
133
- expiresInSeconds: issued.accessTokenExpiresInSeconds,
134
- refreshPath: "/refresh",
135
- refreshBeforeSeconds: 60
136
- });
137
- ctx.bpHeaders?.set("X-BP-Refresh", issued.refreshToken, {
138
- locked: true,
139
- scopeToOwner: true,
140
- expiresInSeconds: issued.refreshTokenExpiresInSeconds
141
- });
142
- return {
143
- status: "ok",
144
- accessToken: issued.accessToken,
145
- expiresInSeconds: issued.accessTokenExpiresInSeconds
146
- };
147
- });
148
- //# sourceMappingURL=route.impl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"route.impl.js","sourceRoot":"","sources":["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