From 284e0518c252ec1c82808939be626fb901ed36f3 Mon Sep 17 00:00:00 2001 From: aeneasr <3372410+aeneasr@users.noreply.github.com> Date: Wed, 23 Apr 2025 11:06:34 +0200 Subject: [PATCH 1/3] docs: clarify use cases and document nextjs --- README.md | 5 +++++ packages/nextjs/README.md | 14 ++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a6c2999da..133508505 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,11 @@ Ory Elements comes with several packages: > before, we recommend migrating to @ory/elements-react. The legacy code base is > in https://github.com/ory/elements-legacy. +If you're not looking to implement custom UI components for login, registration, +settings, verification, recovery, or consent, but rather want to integrate +authentication without changing the UI, follow our +[guide for Auth.js](https://www.ory.sh/docs/getting-started/integrate-auth/auth-js). + ## Getting Started ### React diff --git a/packages/nextjs/README.md b/packages/nextjs/README.md index 97d4cbf85..04671f215 100644 --- a/packages/nextjs/README.md +++ b/packages/nextjs/README.md @@ -4,6 +4,12 @@ This package contains the Next.js SDK for Ory. It is additive to the `@ory/elements-react` package and provides utility functions for the app and page router. +> [!NOTE] +> This package's primary use case is for developing custom components for login, +> registration, verification, settings, recovery, or consent. For integrating +> authentication without changing the UI, follow our +> [guide for Auth.js](https://www.ory.sh/docs/getting-started/integrate-auth/auth-js). + This middleware expects environment variable `NEXT_PUBLIC_ORY_SDK_URL` to be set to your Ory Network Project SDK URL. This is the URL that you would use to access the Ory API. @@ -15,12 +21,12 @@ custom domain for `NEXT_PUBLIC_ORY_SDK_URL`. Run `npm install @ory/nextjs` or `yarn add @ory/nextjs` to install the package. -### Next.js middleware for local development and preview deployments +## Examples This package includes a middleware for the app and page router that enables -local development and preview environments to work with Ory's cookie security -model. When using the `@ory/nextjs` middleware, Ory Tunnel is not needed for -development. +local development and preview environments to work with +[Ory's cookie security model](https://www.ory.sh/docs/security-model). When +using the `@ory/nextjs` middleware, Ory Tunnel is not needed for development. Check the [app router](https://github.com/ory/elements/blob/main/examples/nextjs-app-router/middleware.ts) From 3fb2ca5642c00bbdf5481fad98017e2ab6012a0e Mon Sep 17 00:00:00 2001 From: aeneasr <3372410+aeneasr@users.noreply.github.com> Date: Wed, 23 Apr 2025 11:08:38 +0200 Subject: [PATCH 2/3] chore: synchronize workspaces --- packages/nextjs/README.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/nextjs/README.md b/packages/nextjs/README.md index 04671f215..c20b369ae 100644 --- a/packages/nextjs/README.md +++ b/packages/nextjs/README.md @@ -1,8 +1,8 @@ # `@ory/nextjs` -This package contains the Next.js SDK for Ory. It is additive to the -`@ory/elements-react` package and provides utility functions for the app and -page router. +This package contains the Next.js SDK for Ory. It provides a set of React +components, server-side components, and hooks to interact with the Ory +ecosystem. Supports both app and page routers. > [!NOTE] > This package's primary use case is for developing custom components for login, @@ -10,18 +10,7 @@ page router. > authentication without changing the UI, follow our > [guide for Auth.js](https://www.ory.sh/docs/getting-started/integrate-auth/auth-js). -This middleware expects environment variable `NEXT_PUBLIC_ORY_SDK_URL` to be set -to your Ory Network Project SDK URL. This is the URL that you would use to -access the Ory API. - -If you have a custom domain for your Ory Network Project, you should use the -custom domain for `NEXT_PUBLIC_ORY_SDK_URL`. - -## Installation - -Run `npm install @ory/nextjs` or `yarn add @ory/nextjs` to install the package. - -## Examples +## Use case This package includes a middleware for the app and page router that enables local development and preview environments to work with @@ -34,6 +23,17 @@ and [page router](https://github.com/ory/elements/blob/main/examples/nextjs-pages-router/middleware.ts) middleware example for more details. +## Installation + +Run `npm install @ory/nextjs` or `yarn add @ory/nextjs` to install the package. + +## Configuration + +This middleware expects environment variable `NEXT_PUBLIC_ORY_SDK_URL` to be set +to your Ory Network Project SDK URL. This is the URL that you would use to +access the Ory API. If you have a custom domain for your Ory Network Project, +you should use the custom domain for `NEXT_PUBLIC_ORY_SDK_URL`. + ## Learn by example See the [examples](https://github.com/ory/elements/blob/main/examples) directory From 2c89e57f934dac179b55ec20ee72a411b0c62b1c Mon Sep 17 00:00:00 2001 From: aeneasr <3372410+aeneasr@users.noreply.github.com> Date: Mon, 28 Apr 2025 10:04:01 +0200 Subject: [PATCH 3/3] chore: synchronize workspaces --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 133508505..43e735e24 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ account pages for Ory a breeze: - Dynamically adapts the user interface to your Ory identity schema, sign-in and flow configuration. -Ory Elements comes with several packages: +Ory Elements has several packages: - [`@ory/elements-react`](./packages/elements-react/README.md) - [`@ory/nextjs`](./packages/nextjs/README.md) @@ -22,9 +22,10 @@ Ory Elements comes with several packages: > before, we recommend migrating to @ory/elements-react. The legacy code base is > in https://github.com/ory/elements-legacy. -If you're not looking to implement custom UI components for login, registration, -settings, verification, recovery, or consent, but rather want to integrate -authentication without changing the UI, follow our +Ory Elements is a set of components that you can use to build your own login, +registration, settings, verification, recovery and consent user interface. To +just integrate authentication into your Next.js application and use the default +user interfaces, follow our [guide for Auth.js](https://www.ory.sh/docs/getting-started/integrate-auth/auth-js). ## Getting Started