@riligar/auth-elysia 1.4.2 → 1.5.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.
- package/dist/index.esm.js +6 -1
- package/dist/index.js +6 -1
- package/package.json +1 -1
- package/src/index.js +6 -1
package/dist/index.esm.js
CHANGED
|
@@ -139,7 +139,12 @@ class RiLiGarAuthClient {
|
|
|
139
139
|
return null
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
|
|
142
|
+
// Map JWT standard claims to user object format
|
|
143
|
+
// JWT uses 'sub' for subject (user ID), but clients expect 'id'
|
|
144
|
+
return {
|
|
145
|
+
id: payload.sub,
|
|
146
|
+
...payload,
|
|
147
|
+
}
|
|
143
148
|
} catch (error) {
|
|
144
149
|
console.warn('JWT local verification failed:', error.message);
|
|
145
150
|
return null
|
package/dist/index.js
CHANGED
|
@@ -143,7 +143,12 @@ class RiLiGarAuthClient {
|
|
|
143
143
|
return null
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
|
|
146
|
+
// Map JWT standard claims to user object format
|
|
147
|
+
// JWT uses 'sub' for subject (user ID), but clients expect 'id'
|
|
148
|
+
return {
|
|
149
|
+
id: payload.sub,
|
|
150
|
+
...payload,
|
|
151
|
+
}
|
|
147
152
|
} catch (error) {
|
|
148
153
|
console.warn('JWT local verification failed:', error.message);
|
|
149
154
|
return null
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -138,7 +138,12 @@ class RiLiGarAuthClient {
|
|
|
138
138
|
return null
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
|
|
141
|
+
// Map JWT standard claims to user object format
|
|
142
|
+
// JWT uses 'sub' for subject (user ID), but clients expect 'id'
|
|
143
|
+
return {
|
|
144
|
+
id: payload.sub,
|
|
145
|
+
...payload,
|
|
146
|
+
}
|
|
142
147
|
} catch (error) {
|
|
143
148
|
console.warn('JWT local verification failed:', error.message)
|
|
144
149
|
return null
|