|
2 | 2 |
|
3 | 3 | This package contains the Next.js SDK for Ory. It provides a set of React |
4 | 4 | components, server-side components, and hooks to interact with the Ory |
5 | | -ecosystem. |
| 5 | +ecosystem. Supports both app and page routers. |
6 | 6 |
|
7 | | -<<<<<<< Updated upstream |
8 | | -Supports both app and page routers. |
9 | | -======= |
10 | 7 | > [!NOTE] |
11 | 8 | > This package's primary use case is for developing custom components for login, |
12 | 9 | > registration, verification, settings, recovery, or consent. For integrating |
13 | 10 | > authentication without changing the UI, follow our |
14 | 11 | > [guide for Auth.js](https://www.ory.sh/docs/getting-started/integrate-auth/auth-js). |
15 | 12 |
|
16 | | -This middleware expects environment variable `NEXT_PUBLIC_ORY_SDK_URL` to be set |
17 | | -to your Ory Network Project SDK URL. This is the URL that you would use to |
18 | | -access the Ory API. If you have a custom domain for your Ory Network Project, |
19 | | -you should use the custom domain for `NEXT_PUBLIC_ORY_SDK_URL`. |
20 | | ->>>>>>> Stashed changes |
21 | | -
|
22 | | -## Installation |
23 | | - |
24 | | -Run `npm install @ory/nextjs` or `yarn add @ory/nextjs` to install the package. |
| 13 | +## Use case |
25 | 14 |
|
26 | | -## Examples |
27 | | - |
28 | | -<<<<<<< Updated upstream |
29 | | -See the [examples](../../examples) directory for examples on how to use the |
30 | | -package. |
31 | | -======= |
32 | 15 | This package includes a middleware for the app and page router that enables |
33 | 16 | local development and preview environments to work with |
34 | 17 | [Ory's cookie security model](https://www.ory.sh/docs/security-model). When |
|
40 | 23 | [page router](https://github.com/ory/elements/blob/main/examples/nextjs-pages-router/middleware.ts) |
41 | 24 | middleware example for more details. |
42 | 25 |
|
| 26 | +## Installation |
| 27 | + |
| 28 | +Run `npm install @ory/nextjs` or `yarn add @ory/nextjs` to install the package. |
| 29 | + |
| 30 | +## Configuration |
| 31 | + |
| 32 | +This middleware expects environment variable `NEXT_PUBLIC_ORY_SDK_URL` to be set |
| 33 | +to your Ory Network Project SDK URL. This is the URL that you would use to |
| 34 | +access the Ory API. If you have a custom domain for your Ory Network Project, |
| 35 | +you should use the custom domain for `NEXT_PUBLIC_ORY_SDK_URL`. |
| 36 | + |
43 | 37 | ## Learn by example |
44 | 38 |
|
45 | 39 | See the [examples](https://github.com/ory/elements/blob/main/examples) directory |
46 | 40 | for examples on how to use the package. |
47 | | ->>>>>>> Stashed changes |
48 | 41 |
|
49 | 42 | ## Development |
50 | 43 |
|
|
0 commit comments