@mastra/auth-workos 1.7.0-alpha.1 → 1.7.1-alpha.0

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 (30) hide show
  1. package/dist/auth-provider.d.ts +3 -3
  2. package/dist/fga-provider.d.ts +1 -1
  3. package/dist/index.cjs +6 -1
  4. package/dist/index.js +6 -1
  5. package/dist/rbac-provider.d.ts +1 -1
  6. package/dist/types.d.ts +1 -1
  7. package/package.json +5 -5
  8. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/_types/@internal_core@0.1.4/dist/base/index.d.ts +0 -0
  9. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/_types/@internal_core@0.1.4/dist/index-Diz1p9N7.d.ts +0 -0
  10. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/capabilities.d.ts +0 -0
  11. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/defaults/index.d.ts +0 -0
  12. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/defaults/rbac/index.d.ts +0 -0
  13. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/defaults/rbac/static.d.ts +0 -0
  14. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/defaults/roles.d.ts +0 -0
  15. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/fga-check.d.ts +0 -0
  16. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/index.d.ts +0 -0
  17. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/interfaces/acl.d.ts +0 -0
  18. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/interfaces/fga.d.ts +0 -0
  19. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/interfaces/index.d.ts +0 -0
  20. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/interfaces/permissions.generated.d.ts +0 -0
  21. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/interfaces/rbac.d.ts +0 -0
  22. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/interfaces/user.d.ts +0 -0
  23. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/ee/license.d.ts +0 -0
  24. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/index.d.ts +0 -0
  25. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/provider/index.d.ts +0 -0
  26. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/session/cookie.d.ts +0 -0
  27. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/session/index.d.ts +0 -0
  28. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/session/memory.d.ts +0 -0
  29. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/dist/types/index.d.ts +0 -0
  30. /package/dist/_types/{@internal_auth@0.0.39 → @internal_auth@0.0.40}/package.json +0 -0
@@ -4,9 +4,9 @@
4
4
  * Uses @workos/authkit-session for session management with encrypted
5
5
  * cookie-based sessions that persist across server restarts.
6
6
  */
7
- import type { AuthInitContext, IAuthInit, IOrganizationsProvider, IUserProvider, ISSOProvider, ISessionProvider, Session, SSOCallbackResult, SSOLoginConfig } from './_types/@internal_auth@0.0.39/dist/index.js';
8
- import type { EEUser } from './_types/@internal_auth@0.0.39/dist/ee/index.js';
9
- import { MastraAuthProvider } from './_types/@internal_auth@0.0.39/dist/provider/index.js';
7
+ import type { AuthInitContext, IAuthInit, IOrganizationsProvider, IUserProvider, ISSOProvider, ISessionProvider, Session, SSOCallbackResult, SSOLoginConfig } from './_types/@internal_auth@0.0.40/dist/index.js';
8
+ import type { EEUser } from './_types/@internal_auth@0.0.40/dist/ee/index.js';
9
+ import { MastraAuthProvider } from './_types/@internal_auth@0.0.40/dist/provider/index.js';
10
10
  import { AuthService } from '@workos/authkit-session';
11
11
  import type { AuthKitConfig } from '@workos/authkit-session';
12
12
  import { WorkOS } from '@workos-inc/node';
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * @license Mastra Enterprise License - see ee/LICENSE
8
8
  */
9
- import type { IFGAManager, FGACheckParams, FGAResource, FGACreateResourceParams, FGAUpdateResourceParams, FGADeleteResourceParams, FGAListResourcesOptions, FGARoleAssignment, FGARoleParams, FGAListRoleAssignmentsOptions, MastraFGAPermissionInput } from './_types/@internal_auth@0.0.39/dist/ee/index.js';
9
+ import type { IFGAManager, FGACheckParams, FGAResource, FGACreateResourceParams, FGAUpdateResourceParams, FGADeleteResourceParams, FGAListResourcesOptions, FGARoleAssignment, FGARoleParams, FGAListRoleAssignmentsOptions, MastraFGAPermissionInput } from './_types/@internal_auth@0.0.40/dist/ee/index.js';
10
10
  import type { MastraFGAWorkosOptions, WorkOSUser } from './types.js';
11
11
  export declare class WorkOSFGAResourceNotFoundError extends Error {
12
12
  readonly status = 404;
package/dist/index.cjs CHANGED
@@ -747,7 +747,12 @@ var MastraAuthWorkos = class extends MastraAuthProvider {
747
747
  const sessionData = {
748
748
  accessToken: authResponse.accessToken,
749
749
  refreshToken: authResponse.refreshToken,
750
- user: authResponse.user,
750
+ user: {
751
+ ...authResponse.user,
752
+ createdAt: authResponse.user.createdAt.toISOString(),
753
+ updatedAt: authResponse.user.updatedAt.toISOString(),
754
+ lastSignInAt: authResponse.user.lastSignInAt?.toISOString() ?? null
755
+ },
751
756
  organizationId: authResponse.organizationId,
752
757
  impersonator: authResponse.impersonator
753
758
  };
package/dist/index.js CHANGED
@@ -746,7 +746,12 @@ var MastraAuthWorkos = class extends MastraAuthProvider {
746
746
  const sessionData = {
747
747
  accessToken: authResponse.accessToken,
748
748
  refreshToken: authResponse.refreshToken,
749
- user: authResponse.user,
749
+ user: {
750
+ ...authResponse.user,
751
+ createdAt: authResponse.user.createdAt.toISOString(),
752
+ updatedAt: authResponse.user.updatedAt.toISOString(),
753
+ lastSignInAt: authResponse.user.lastSignInAt?.toISOString() ?? null
754
+ },
750
755
  organizationId: authResponse.organizationId,
751
756
  impersonator: authResponse.impersonator
752
757
  };
@@ -4,7 +4,7 @@
4
4
  * Integrates WorkOS organization memberships and roles with Mastra's
5
5
  * permission-based access control system.
6
6
  */
7
- import type { IRBACProvider, RoleMapping } from './_types/@internal_auth@0.0.39/dist/ee/index.js';
7
+ import type { IRBACProvider, RoleMapping } from './_types/@internal_auth@0.0.40/dist/ee/index.js';
8
8
  import type { WorkOSUser, MastraRBACWorkosOptions } from './types.js';
9
9
  export declare class MastraRBACWorkos implements IRBACProvider<WorkOSUser> {
10
10
  private workos;
package/dist/types.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Shared types for WorkOS integration.
3
3
  */
4
- import type { EEUser, FGARouteResolver, MastraFGAPermission, MastraFGAPermissionInput, RoleMapping } from './_types/@internal_auth@0.0.39/dist/ee/index.js';
4
+ import type { EEUser, FGARouteResolver, MastraFGAPermission, MastraFGAPermissionInput, RoleMapping } from './_types/@internal_auth@0.0.40/dist/ee/index.js';
5
5
  import type { JwtPayload } from '@mastra/auth';
6
6
  import type { User, OrganizationMembership } from '@workos-inc/node';
7
7
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/auth-workos",
3
- "version": "1.7.0-alpha.1",
3
+ "version": "1.7.1-alpha.0",
4
4
  "description": "Mastra WorkOS Auth integration",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -23,7 +23,7 @@
23
23
  "@workos-inc/node": "12.2.0",
24
24
  "@workos/authkit-session": "^0.7.1",
25
25
  "lru-cache": "^11.5.3",
26
- "@mastra/auth": "1.2.1-alpha.0"
26
+ "@mastra/auth": "1.2.1"
27
27
  },
28
28
  "peerDependencies": {
29
29
  "hono": "^4.0.0"
@@ -35,9 +35,9 @@
35
35
  "tsdown": "0.23.1",
36
36
  "typescript": "^7.0.2",
37
37
  "vitest": "5.1.0",
38
- "@internal/auth": "0.0.39",
39
- "@internal/lint": "0.0.151",
40
- "@internal/types-builder": "0.0.126"
38
+ "@internal/auth": "0.0.40",
39
+ "@internal/types-builder": "0.0.127",
40
+ "@internal/lint": "0.0.152"
41
41
  },
42
42
  "files": [
43
43
  "dist",