@mastra/auth-workos 1.6.5 → 1.6.6
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/dist/_types/@internal_auth/dist/ee/interfaces/permissions.generated.d.ts +9 -1
- package/dist/_types/@internal_auth/dist/provider/index.d.ts +1 -1
- package/dist/_types/@internal_auth/package.json +1 -0
- package/dist/auth-provider.d.ts +3 -3
- package/dist/auth-provider.d.ts.map +1 -1
- package/dist/fga-provider.d.ts +1 -1
- package/dist/index.cjs +5 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/rbac-provider.d.ts +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -459,13 +459,15 @@ var MastraAuthWorkos = class extends MastraAuthProvider {
|
|
|
459
459
|
const { auth } = webRequest ? await this.authService.withAuth(webRequest) : { auth: { user: null } };
|
|
460
460
|
if (auth.user) {
|
|
461
461
|
let memberships;
|
|
462
|
+
let organizationId = auth.organizationId;
|
|
462
463
|
if (this.fetchMemberships) try {
|
|
463
464
|
memberships = await this.getMemberships(auth.user.id);
|
|
465
|
+
organizationId ??= this.getSingleMembershipOrganizationId(memberships);
|
|
464
466
|
} catch {}
|
|
465
467
|
return {
|
|
466
468
|
...mapWorkOSUserToEEUser(auth.user),
|
|
467
469
|
workosId: auth.user.id,
|
|
468
|
-
organizationId
|
|
470
|
+
organizationId,
|
|
469
471
|
memberships
|
|
470
472
|
};
|
|
471
473
|
}
|
|
@@ -937,7 +939,7 @@ var MastraAuthWorkos = class extends MastraAuthProvider {
|
|
|
937
939
|
}
|
|
938
940
|
};
|
|
939
941
|
//#endregion
|
|
940
|
-
//#region ../../packages/_internals/auth/dist/ee-
|
|
942
|
+
//#region ../../packages/_internals/auth/dist/ee-btY6vXIW.js
|
|
941
943
|
/**
|
|
942
944
|
* FGA enforcement utility for checking fine-grained authorization.
|
|
943
945
|
*
|
|
@@ -973,6 +975,7 @@ const RESOURCE_EXPANSIONS = { stored: [
|
|
|
973
975
|
"stored-prompt-blocks",
|
|
974
976
|
"stored-scorers",
|
|
975
977
|
"stored-skills",
|
|
978
|
+
"stored-workflows",
|
|
976
979
|
"stored-workspaces"
|
|
977
980
|
] };
|
|
978
981
|
/**
|