Integrations with Ory
This repository contains integrations for connecting with Ory Cloud.
Table of Contents
NextJS / Vercel
To connect a NextJS (optionally deployed via Vercel) with Ory, do the following
in your NextJS App:
$ npm i --save @ory/integrations
Then, add create a file at <your-nextjs-app>/api/.ory/[...paths.ts]
with the
following contents:
import { config, createApiHandler } from '@ory/integrations/next-edge'
export { config }
export default createApiHandler({
})
You need to set the environment variable ORY_SDK_URL
to your
Ory Cloud Project SDK URL. For
a list of available options head over to
src/nextjs/index.ts
.
SDK Helpers
This package contains several helpers for using the Ory SDKs with TypeScript,
JavaScript, and NodeJS.
Type Guards
This package includes type guards for identifying UI nodes.
import {
isUiNodeImageAttributes,
isUiNodeInputAttributes,
isUiNodeScriptAttributes,
isUiNodeTextAttributes
} from '@ory/integrations/ui'
if (isUiNodeImageAttributes(node.attributes)) {
console.log('it is an image: ', node.attributes.src)
}
UI Node Helpers
This package contains convenience functions for UI nodes:
import { getNodeLabel } from '@ory/integrations/ui'
: Returns the node's
label.import { getNodeId } from '@ory/integrations/ui'
: Returns a node's ID.import { filterNodesByGroups } from '@ory/integrations/ui'
: Filters nodes by
their groups.