You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rename the legacy MayRLabsAuthError class to AuthError and update all usages across the repo. Propagated changes to errors, core/base, core/client, and tests to throw/check AuthError instead of the old name. Updated @mayrlabs/auth and @mayrlabs/auth-nextjs package versions to 0.5.1, adjusted auth-nextjs exports to re-export AuthError, related payload types, and utility functions (generateCodeChallenge, generateCodeVerifier, generateRandomString). Changelogs were updated to reflect the rename and the new patch release.
Copy file name to clipboardExpand all lines: packages/auth-nextjs/CHANGELOG.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,25 @@
1
1
# Changelog
2
2
3
+
## [0.5.1] - 2026-04-10
4
+
5
+
### Breaking Changes
6
+
7
+
- Exported `AuthError` from `@mayrlabs/auth`
8
+
- Exported `generateCodeChallenge`, `generateCodeVerifier` and `generateRandomString` util functions from `@mayrlabs/auth`
9
+
10
+
### Fixes
11
+
12
+
Fixed exports of `AuthErrorPayload`, `AuthMachinePayload`, `AuthUserPayload` from `@mayrlabs/auth`
13
+
3
14
## [0.5.0] - 2026-04-10
4
15
5
16
### ⚠️ Breaking Changes
17
+
6
18
-`redirectToLogin()` no longer requires the `NextRequest` parameter as it uses absolute URL redirection.
7
19
-`getUserOrRedirect` and `AuthProvider` now redirect to the local `redirects.error` path (default `/login`) instead of absolute SSO URLs in server context.
8
20
9
21
### Features
22
+
10
23
-**CSRF Protection**: Added robust state-parameter verification for all SSO flows using `httpOnly` cookies (5-minute expiry).
11
24
-**Security Hardening**: The state cookie is now immediately deleted after consumption in `handleCallback` to maximize security.
12
25
-**Configurable State Key**: Added `MAYRLABS_AUTH_STATE_KEY` env variable and `cookie.stateKey` option to customize the CSRF state cookie name.
@@ -19,6 +32,7 @@
19
32
## [0.4.2] - 2026-04-08
20
33
21
34
### Breaking Changes
35
+
22
36
- Updated session key defaults to prevent collision between Client and Issuer sessions.
Copy file name to clipboardExpand all lines: packages/auth-nextjs/package.json
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "@mayrlabs/auth-nextjs",
3
-
"version": "0.5.0",
3
+
"version": "0.5.1",
4
4
"description": "The official Next.js App Router integration for @mayrlabs/auth featuring Middleware guards, Server Actions utilities, and React Context bindings.",
Copy file name to clipboardExpand all lines: packages/auth/CHANGELOG.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,15 @@
1
1
# Changelog
2
2
3
+
## [0.5.1] - 2026-04-10
4
+
5
+
### Breaking Changes
6
+
7
+
- Renamed `MayRLabsAuthError` -> `AuthError`
8
+
3
9
## [0.5.0] - 2026-04-10
4
10
5
11
### Features
12
+
6
13
-**CSRF Protection**: Implemented state-parameter verification for SSO flows to prevent forgery.
7
14
-**Node.js Compatibility**: Improved `b64url` encoding to utilize `Buffer` when available, ensuring compatibility with Next.js Server Actions and Middleware.
8
15
-**User Model**: Renamed `MayRLabsUser` to `AuthUser` and aligned interface with the Account Center (`id`, `username`, nullable name fields).
@@ -14,6 +21,7 @@
14
21
## [0.4.2] - 2026-04-08
15
22
16
23
### Breaking Changes
24
+
17
25
- Separated session cookie keys for client and issuer applications.
18
26
- Updated default session key to `mayrlabs-client-session` (Client) and `mayrlabs-issuer-session` (Issuer).
19
27
@@ -63,7 +71,7 @@ Minor bump to ensure version sync
63
71
-`IssuerAuthSetup`: For identity providers (signing tokens with Private JWK).
64
72
-`ClientAuthSetup`: For consumer applications (verifying tokens with Public JWK and machine authentication).
65
73
-**JWK Integration**: Switched to JSON Web Key (JWK) standard for key management with built-in caching for performance.
66
-
-**Strict Typing**: Removed all `any` types and implemented exhaustive TypeScript interfaces for `MayRLabsAuthUserPayload`, `MayRLabsAuthMachinePayload`, and `MayRLabsAuthErrorPayload`.
74
+
-**Strict Typing**: Removed all `any` types and implemented exhaustive TypeScript interfaces for `MayRLabsAuthUserPayload`, `MayRLabsAuthMachinePayload`, and `AuthErrorPayload`.
0 commit comments