Skip to content

Commit 284e051

Browse files
committed
docs: clarify use cases and document nextjs
1 parent 6defacd commit 284e051

2 files changed

Lines changed: 15 additions & 4 deletions

File tree

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ Ory Elements comes with several packages:
2222
> before, we recommend migrating to @ory/elements-react. The legacy code base is
2323
> in https://github.com/ory/elements-legacy.
2424
25+
If you're not looking to implement custom UI components for login, registration,
26+
settings, verification, recovery, or consent, but rather want to integrate
27+
authentication without changing the UI, follow our
28+
[guide for Auth.js](https://www.ory.sh/docs/getting-started/integrate-auth/auth-js).
29+
2530
## Getting Started
2631

2732
### React

packages/nextjs/README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ This package contains the Next.js SDK for Ory. It is additive to the
44
`@ory/elements-react` package and provides utility functions for the app and
55
page router.
66

7+
> [!NOTE]
8+
> This package's primary use case is for developing custom components for login,
9+
> registration, verification, settings, recovery, or consent. For integrating
10+
> authentication without changing the UI, follow our
11+
> [guide for Auth.js](https://www.ory.sh/docs/getting-started/integrate-auth/auth-js).
12+
713
This middleware expects environment variable `NEXT_PUBLIC_ORY_SDK_URL` to be set
814
to your Ory Network Project SDK URL. This is the URL that you would use to
915
access the Ory API.
@@ -15,12 +21,12 @@ custom domain for `NEXT_PUBLIC_ORY_SDK_URL`.
1521

1622
Run `npm install @ory/nextjs` or `yarn add @ory/nextjs` to install the package.
1723

18-
### Next.js middleware for local development and preview deployments
24+
## Examples
1925

2026
This package includes a middleware for the app and page router that enables
21-
local development and preview environments to work with Ory's cookie security
22-
model. When using the `@ory/nextjs` middleware, Ory Tunnel is not needed for
23-
development.
27+
local development and preview environments to work with
28+
[Ory's cookie security model](https://www.ory.sh/docs/security-model). When
29+
using the `@ory/nextjs` middleware, Ory Tunnel is not needed for development.
2430

2531
Check the
2632
[app router](https://github.com/ory/elements/blob/main/examples/nextjs-app-router/middleware.ts)

0 commit comments

Comments
 (0)