Skip to content

Commit 4687fc4

Browse files
Merge branch 'main' into frederikprijck-patch-1
2 parents 9301f86 + 611c691 commit 4687fc4

File tree

62 files changed

+518
-179
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+518
-179
lines changed

.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v4.0.3
1+
v4.1.0

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Change Log
22

3+
## [v4.1.0](https://github.com/auth0/nextjs-auth0/tree/v4.1.0) (2025-03-13)
4+
[Full Changelog](https://github.com/auth0/nextjs-auth0/compare/v4.0.3...v4.1.0)
5+
6+
**Added**
7+
- Programmatic PAR [\#1946](https://github.com/auth0/nextjs-auth0/pull/1946) ([tusharpandey13](https://github.com/tusharpandey13))
8+
9+
**Fixed**
10+
- fix: stop importing named export from package.json [\#1962](https://github.com/auth0/nextjs-auth0/pull/1962) ([tusharpandey13](https://github.com/tusharpandey13))
11+
312
## [v4.0.3](https://github.com/auth0/nextjs-auth0/tree/v4.0.3) (2025-03-10)
413
[Full Changelog](https://github.com/auth0/nextjs-auth0/compare/v4.0.2...v4.0.3)
514

EXAMPLES.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -752,3 +752,33 @@ const sessionCookieValue = await generateSessionCookie(
752752
}
753753
)
754754
```
755+
756+
757+
## Programmatic Pushed Authentication Requests (PAR)
758+
759+
The method `startInteractiveLogin` can be called with authorizationParams to initiate an interactive login flow.
760+
The code collects authorization parameters on the server side rather than constructing them directly in the browser.
761+
762+
```typescript
763+
// app/api/auth/login/route.ts
764+
import { auth0 } from "./lib/auth0";
765+
import { NextRequest } from "next/server";
766+
767+
export const GET = async (req: NextRequest) => {
768+
// Extract custom parameters from request URL if needed
769+
const searchParams = Object.fromEntries(req.nextUrl.searchParams.entries());
770+
771+
// Call startInteractiveLogin with optional parameters
772+
return auth0.startInteractiveLogin({
773+
// a custom returnTo URL can be specified
774+
returnTo: "/dashboard",
775+
authorizationParameters: {
776+
prompt: searchParams.prompt,
777+
login_hint: searchParams.login_hint,
778+
// Add any custom auth parameters if required
779+
audience: "custom-audience"
780+
}
781+
});
782+
};
783+
784+
```

docs/assets/hierarchy.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/assets/navigation.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/assets/search.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/classes/errors.AccessTokenError.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

docs/classes/errors.AuthorizationCodeGrantError.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

docs/classes/errors.AuthorizationError.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

docs/classes/errors.BackchannelLogoutError.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)