@mastra/auth 1.0.2-alpha.0 → 1.0.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/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # @mastra/auth
2
2
 
3
+ ## 1.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Fixed Studio showing unauthenticated state when using `MastraJwtAuth` with custom headers. `MastraJwtAuth` now implements the `IUserProvider` interface (`getCurrentUser`/`getUser`), so the Studio capabilities endpoint can resolve the authenticated user from the JWT Bearer token. ([#14411](https://github.com/mastra-ai/mastra/pull/14411))
8
+
9
+ Also added an optional `mapUser` option to customize how JWT claims are mapped to user fields:
10
+
11
+ ```typescript
12
+ new MastraJwtAuth({
13
+ secret: process.env.JWT_SECRET,
14
+ mapUser: payload => ({
15
+ id: payload.userId,
16
+ name: payload.displayName,
17
+ email: payload.mail,
18
+ }),
19
+ });
20
+ ```
21
+
22
+ Closes #14350
23
+
3
24
  ## 1.0.2-alpha.0
4
25
 
5
26
  ### Patch Changes
@@ -3,7 +3,7 @@ name: mastra-auth
3
3
  description: Documentation for @mastra/auth. Use when working with @mastra/auth APIs, configuration, or implementation.
4
4
  metadata:
5
5
  package: "@mastra/auth"
6
- version: "1.0.2-alpha.0"
6
+ version: "1.0.2"
7
7
  ---
8
8
 
9
9
  ## When to use
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.2-alpha.0",
2
+ "version": "1.0.2",
3
3
  "package": "@mastra/auth",
4
4
  "exports": {},
5
5
  "modules": {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/auth",
3
- "version": "1.0.2-alpha.0",
3
+ "version": "1.0.2",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "files": [
@@ -37,9 +37,9 @@
37
37
  "tsup": "^8.5.1",
38
38
  "typescript": "^5.9.3",
39
39
  "vitest": "4.0.18",
40
- "@internal/lint": "0.0.71",
41
- "@internal/types-builder": "0.0.46",
42
- "@mastra/core": "1.14.0-alpha.2"
40
+ "@mastra/core": "1.14.0",
41
+ "@internal/types-builder": "0.0.47",
42
+ "@internal/lint": "0.0.72"
43
43
  },
44
44
  "homepage": "https://mastra.ai",
45
45
  "repository": {