1. Project Overview & Quickstart (ory/examples)
Awesome Ory
An awesome list of the Ory ecosystem. Ory provides scalable, flexible, and secure identity and access management (IAM) solutions that empower developers to build innovative applications. Whether you handle billions of users or launch a startup, Ory makes security and compliance simple with open-source transparency and cutting-edge tools.
If you have any questions or suggestions open a discussion, or join the Ory Chat!
See CONTRIBUTING.md for pointers on how to contribute.
Contents
- Ecosystem
- Developer resources
- Blog posts
- Videos
- Examples
- Projects
- Services
- Postman collections
- Archive
Ecosystem
Overview of the main projects in the Ory ecosystem.
- Ory Network
- Ory Hydra
- Ory Kratos
- Ory Keto
- Ory Oathkeeper
- Ory Fosite
- Ory Dockertest
- Other Ory projects can be found here
Developer resources
Developer resources and forums for discussing Ory and meeting other users
Ory Documentation - Comprehensive documentation for major Ory services
Ory Slack - Slack community for the Ory ecosystem
Ory Archive - Searchable archive of the Ory Slack community
GitHub Discussions - All discussions for Ory services on GitHub
StackOverflow - StackOverflow questions tagged with
oryTwitter - Official Ory Twitter account
Ory Support π Enterprise-grade support directly from the Ory maintainers β¨
Blog posts
Ory blog guest articles
Are you building something with Ory?
Are you interested in Auth and security topics in general?
Do you want to share your knowledge and experience?
Reach out to get published in the Ory blog!
- Deploying Ory Oathkeeper as an AWS Lambda Authorizer
- Using Ory with Cloudflare Workers
- How I built LoginWithHN using Ory Hydra
- Add Authentication to your Flutter Web Applications with Ory Kratos
- Looking at Zanzibar through Ory Keto
Ory ecosystem
- Authentication Infrastructure β Using Ory Stack (Ory Kratos, Ory Hydra)
- Open Source Authentication with Hydra and Kratos
Ory Kratos
- Building a Quarkus application with Ory Kratos
- How to write an application that integrates Kratos in Go
- Ory Kratos reverse proxy (Nginx) example
Ory Hydra
- Ory Hydra with Apache APISIX integration
- Practical Example of Implementing OAuth 2.0 Using ory/hydra
- OAuth 2.0 with Ory Hydra and Vapor on iOS:
Part 1,
Part 2,
Part 3,
Part 4. - Creating an OAuth 2.0 custom lambda authorizer for use with Amazons (AWS) API Gateway using Hydra
Ory Keto
Ory Oathkeepeer
- API Access Control with Ambassador and Ory Oathkeeper
- Ory Oathkeeper Istio best practices/reference configuration
Ory Dockertest
- Writing Tests for MongoDB using Dockertest in Go
- Integration tests in Golang with dockertest
- Go Package for better integration tests: Ory Dockertest
- Using Dockertest with Golang
- How to write a Go API Part 3: Testing With Dockertest
Videos
Examples
Code examples that show how to integrate Ory with a framework, software stack, or how to solve a specific use case.
Ory Ecosystem
- Microservices app using Ory, NestJS, Kubernetes
- Selfhosted admin frontend in ASP.net
- Next.js based starter for Ory Kratos and Ory Hydra
- APISIX as gateway with Ory, linkerd, and kustomize
- Ory Kratos & Oathkeeper with Kong, docker-compose
- Ory Kratos, Keto, Oathkeeper Kubernetes example
Ory Kratos
- Ory Kratos Nuxt example
- Ory Kratos Sveltekit with MeltUI and TailwindCSS example
- Ory Kratos for Plug apps example
- Ory Kratos Svelte Node example
- Ory Kratos SvelteKit example
- Ory Kratos Admin Interface in React example
- Ory Kratos Admin Interface with analytics
- Ory Kratos SPA Self-service UI written in the Dioxus rust framework (WASM)
Ory Hydra
- Ory Hydra Web3 Authentication incl. Metamask, Coinbase, Walletconnect example
- Ory Hydra Java identity provider example
- Ory Hydra Golang identity provider example
- Ory Hydra client integrations with OAuth2.0 & OIDC example
- Ory Hydra PKCE & Spring Boot 2 example
Projects
Community projects, configuration tools, or development helpers extending Ory services.
Ory Ecosystem
Ory Kratos
- Ory Kratos MCP server
- Ory Kratos Symfony Authenticator
- Ory Kratos Loopback4 integration
- Ory Kratos read-only traits
- Ory Kratos Client Rust WASM
Ory Hydra
- Ory Hydra ExpressJS OAuth2 Middleware for MCP Servers
- Ory Hydra Testcontainer
- Ory Hydra Golang HTTP middleware
- Ory Hydra OAuth2 Token Exchange RFC 8693
- Ory Hydra Terraform Provider
Ory Keto
Ory Oathkeeper
Ory Fosite
Services
Managed services that run Ory for you
- Ory Network - Self-service managed IAM service operated by Ory
- Ory Enterprise License - Private, compliant, and enterprise-grade version of Ory
Postman collections
The API Collections are built directly from the swagger specification (you can find it at the path /spec/api.json in GitHub) and
are organized into folders that categorize the various API calls. To be able to work with the collection you need to set thebaseURl variable. For example, when running Ory Kratos the baseURl needs to be set to the public endpoint. You may also have
to configure query parameters or the JSON method body, depending on the API call.
Note that while the collections should be up to date, please open an issue here if that's not the case.
Don't store tokens in Postman as environment variables! If you are signed in to the Postman application, it will automatically try to synchronize Collections and Environments with the Postman servers. This means that a token, which could allow someone else access to your APIs, is being uploaded to Postman's servers. Postman has taken measures to ensure that tokens are encrypted and encourages users to store them in Environment Variables. Read more here.
Archive
You can find old, archived, outdated, or incomplete projects in ARCHIVE.md
2. Official Technical Reference & Guides (ory/docs)
Ory Documentation
[Chat](https://slack.ory.com) | [Newsletter](https://www.ory.com/l/sign-up-newsletter) [Documentation](https://www.ory.com/docs/) | [Support this project!](https://opencollective.com/ory) [Work in Open Source, Ory is hiring!](https://www.ory.com/jobs/)
- Overview
- Style guide
Overview
Ory documentation is the single source of truth for usage, implementation,
configuration, and troubleshooting of the Ory Network and all projects of the
Ory Ecosystem. The documentation
is best consumed through the
Ory documentation portal.
To see the source code of each of the projects, visit the project repository:
Documentation of other Ory projects:
Style guide
This style guide outlines the most important rules and conventions that apply to
the Ory documentation. If there are no Ory-specific requirements or guidelines
for a given topic, refer to the
Microsoft Writing Style Guide
and follow the rules described there.
Grammar and style
Ory documentation must be clear, concise, and unambiguous. To achieve that,
follow these simple rules:
- Use active voice and present tense.
- Always write in American English.
- Use
zero conditional
when talking about the cause-and-effect in software behavior. - Use the right words to make sure that your message is clear and unambiguous.
Don't use words like "should", "could", or "may". - Don't use phrasal verbs, colloquialisms, and jargon.
- Don't refer to users in ways that imply their sex.
- Don't use contractions of Latin origins such as
e.gori.e. - Remember to use articles (
a,an,the) in your writing. - Use common contractions such as
aren't,don't,doesn'tto sound
friendly and informal.
Lists
Ory follows the
Microsoft Writing Style Guide list formatting guidelines.
- List items must begin with a capital letter unless there's a specific reason
not to do that. For example, the item is a proper name that's not capitalized,
a parameter, or a command wrapped in backticks (`). - Don't use punctuation such as commas (
,), semicolons (;), or conjunctions
(and,or) at the end of list items. - Use periods (
.) only at the end of list items that are proper sentences,
even very short ones. - Make list items consistent in structure. For example, if one list item is a
full sentence, make all list items full sentences. Don't use different
structures for list items in a single list. - Indent lines with 3 spaces to denote nested sub-items in lists. Indent text,
code blocks, and images. - When a bulleted list presents parallel items that each pair a label with an
explanation, bold the label as a lead-in, followed by an em dash and the
explanation. Use this pattern only when every bullet shares it. For example:- Fully managed infrastructure β Ory Network runs a global edge network
with multi-region availability, automatic scaling, and high availability.
You don't patch servers, rotate keys, or manage failover. - Predictable pricing β Usage-based billing with no per-seat fees, so cost
scales with traffic rather than team size.
- Fully managed infrastructure β Ory Network runs a global edge network
Headings
- Use
sentence case
for headings. - The highest heading level in documents is
h2. Useh1only when you
override the documenttitle. - The lowest heading level in documents is
h4. If you absolutely need to add
more heading levels, don't go lower thanh5. - Avoid using symbols and special characters in headings.
- Leave one blank line before and after a heading.
- Don't use links in headings.
- Headings play an important role in SEO and searchability and make the document
more scannable. Make your headings short and true to the content they
introduce.
Formatting
Write in Markdown. Don't mix HTML tags with
Markdown. Files with the .mdx extension use
JSX-extended Markdown (MDX).
Document front matter
Add this front matter to every document you create:
---
id: excellent_feature
title: Learn how to use the excellent feature in your implementation
sidebar_label: Excellent feature
slug: excellent-feature-for-some-reason
---idis the document identifier that makes up the last part of the document
URL. Try to come up with a short ID that accurately describes the content. IDs
that use multiple words must use hyphens (-) to separate the words.titleis the document title thatβs displayed as the page header. Used by
search engines when displaying search results. Try to make it descriptive so
that it helps readers understand what the document is about at the first
glance. If it comes out long(ish), you can overwrite it by adding ah1in
the very first line following the front matter. Use sentence case.sidebar_labelrepresents the document title used in the sidebar (left
navigation). Create a short document title that fits the sidebar width. Use
sentence case.slugis an optional property that allows you to customize the document URL.
Use it to create more meaningful, SEO-friendly URLs.descriptionis a one-sentence summary of the page. Any document that appears
as a card in a sidebar category (a generated category index) must set it,
because Docusaurus derives the card text fromcreateExcerpt, which only
keeps the first physical line of the first paragraph and truncates at the
source line wrap. Settingdescriptiongives you the full, intended card text
and is also used by search engines. Keep it to one short sentence.
Bolding, 'code formatting'
- Use only
codeand bold formatting. Don't use any other formatting. - For inline code, wrap text in single backticks (
`). For code blocks use
three backticks (```) - Use
codeformatting for:- Commands, for example
ory --help - File names and paths, for example
file.txt,~/Desktop/git/docs - Environment variables, for example
CUSTOM_ENV_VAR
- Commands, for example
- Use bold only when writing about user interface (UI) elements.
Linking
Link to external web pages using absolute links. Don't expose the link on its
own. Instead, embed it in descriptive text. For example:textOry documentation uses [Prism syntax highlighting](https://prismjs.com/).Link to documents within this repository using relative links. When
referencing the file, use the file name.text[Some link](../path/to/file.mdx)
Code blocks
Always add a programming language identifier to code blocks. Ory documentation
uses Prism syntax highlighting.text```json {some-JSON-code-here} ```For command line examples, use
shellas the programming language identifier.
Don't put$before the command.text```shell ory get identities ```For Ory Permissions (Keto) relation tuples, use
keto-relation-tuples
language identifier, and for relationships useketo-relationships.text```keto-relation-tuples namespace:object#relation:subject // comment ``` ```keto-relationships namespace:subject is relation of object is namespace:subject allowed to permission on object? // comment ```For multi-line commands, indent subsequent lines of the command with two
spaces.text```shell curl --request GET -sL \ --header "Content-Type: application/json" \ --header "Authorization: Bearer {ORY_API_KEY}" \ 'https://{project-slug}.projects.oryapis.com/admin/identities/{identity_id}?include_credential=oidc' ```
Placeholders and dummy data
Using placeholders and dummy data in code snippets and command examples is a
good way to ensure that users run commands in the context of their setups and,
as a result, achieve success faster. Additionally, this fabricated information
prevents leaking of sensitive data such as tokens or API keys.
Follow these rules when using placeholders and dummy data:
- Introduce placeholders and dummy data in curly brackets with a preceding $ so
they can be used in bash commands. - Use colons (
-) or underscores (_) to separate multiple words, for example{ORY_SESSION_COOKIE}or{project-slug}. - When referring to a project API URL or SDK URL, always use
https://$PROJECT_SLUG.projects.oryapis.com. - When referring to scenarios in which the user runs a custom domain, use
https://ory.your-custom-domain.com. - Always use short, but descriptive, verbal placeholders. Don't mix digits and
letters to mimic the format of the data you mock.
UI references
When talking about any user interface (UI) in the Ory documentation, follow
these rules:
- When referring to UI elements, always use the exact text associated with the
given element. - Format the name of the UI element you refer to in bold.
- Format any user input with
code.
Example: In the Identity Model Schema box, type
MyCustomIdentitySchema.
Diagrams
Use Mermaid to create diagrams. You
can run the tool locally or use Mermaid Live Editor in
the browser. See the
Mermaid Cheatsheet
for a detailed description on how to use Mermaid.
To add a Mermaid diagram, use this mdx-code-block:
```mdx-code-block
import Mermaid from "@site/src/theme/Mermaid"
<Mermaid
chart={`
{your-Mermaid-code}
`}
/>
```Import & reference content
Markdown partials
If a certain piece of content must be re-used across multiple documents in the
exact form, it's a good idea to turn it into a partial. Thanks to that, you
maintain content in a single file, instead of multiple instances of the same
content in many docs.
Add partials to the _common directory.
To import a partial, use this mdx-code-block:
```mdx-code-block
import ExamplePartial from './_common/example.md'
<ExamplePartial />
```TIP: Headings contained in partials aren't added to the Docusaurus table
of contents (ToC). To make sure users can access all headings through the ToC,
don't add headings to partials. Instead, add appropriate headings to the
document manually and introduce partials after them. To see an implementation
of this approach, look at
this file.
Code snippets
From GitHub
Use
CodeFromRemote
to import code directly from GitHub.
Use this mdx-code-block:
```mdx-code-block
import CodeFromRemote from '@theme/CodeFromRemote'
<CodeFromRemote
lang="js"
link="https://github.com/ory/kratos-selfservice-ui-node/blob/master/src/middleware/simple.ts"
src="https://raw.githubusercontent.com/ory/kratos-selfservice-ui-node/master/src/middleware/simple.ts"
startAt="{CONTENT_FROM_CODE}"
endAt="{CONTENT_FROM_CODE}"
/>
```langspecifies the programming language the code is inlinkis the file location displayed in the top part of the code block windowsrcis the direct link used to import the code (optional)startAt,endAtare used to define where the imported snippet starts and
ends (optional)
From this repository
```mdx-code-block
import CodeBlock from '@theme/CodeBlock'
import exampleJs from '!!raw-loader!./code-example.jsx'
import exampleGo from '!!raw-loader!./code-example.go'
<CodeBlock className="language-jsx">{exampleJs}</CodeBlock>
<CodeBlock className="language-go">{exampleGo}</CodeBlock>
```Screenshots and videos
- Use screenshots and videos sparingly. These resources tend to get out-of-date
quickly and are cumbersome to maintain. - Screenshots and videos must capture only the relevant parts of the screen.
- Screenshots and videos must capture UI elements in English. If youβre
capturing parts of the browser UI in your work, make sure the UI is in
English. - Make an effort to get the screenshots and videos looking as clean as possible.
Avoid situations where text fields suggest irrelevant inputs, avoid erratic
mouse cursor movements and general chaos. - You must add media to
_staticfolders.- In the
_staticdirectory, each document that uses media has its own
directory. - In the directory of the document, the files have numbers for names, for
example,1.png,2.png,3.png. The filenames should reflect the stage
at which the media is used in the document. This means that the screenshot
named1.pngwill be used in line 70, while the diagram2.svgwill be
used in line 100.
- In the
Compressing images
Compress images you add to the documentation to keep the repository lean. You
can use pngquant.
Read this article to learn a trick to make your screenshots 80% smaller.
Recording and compressing videos
We recommend using
Quicktime to record videos.
Follow these rules:
- Use 16:9 format with at least 1024 pixels of width.
ffmpegwill scale it to
the right size. - Make sure that no history or auto-suggestions are visible.
After recording the video, convert the .mov file to mp4 and webm:
file="screencast.mov"
ffmpeg -i $file -an -c:v libvpx-vp9 -vf scale=1024:-1 -crf 30 -b:v 0 "${file%.*}".webm
ffmpeg -i $file -vcodec h264 -vf scale=1024:-1 -an "${file%.*}".mp4Use this mdx-code-block to add the video to your document:
```mdx-code-block
import mp4 from './_static/screencast.mp4'
import webm from './_static/screencast.webm'
import VideoEmbed from '@site/src/components/VideoEmbed'
<VideoEmbed mp4={mp4} webm={webm} />
```Ory Console
Navigate to Ory Console Pages
You can use the /current/ route to navigate users to their active Ory Network
project. For example, to access the Custom UI settings for the active Ory
Network project in the Console, you can link to:
https://console.ory.com/projects/current/ui
When referencing a page of the Ory Console, use the<ConsoleLink route="project..." /> component in MDX files.
The component resolves the navigation section and page title for the given
route, and renders a standard markup for both, as well as the link with the/current/ shortcut mentioned above:
<ConsoleLink route="project.activity.events" />
// becomes:
// Activity β Logs & Events in the [Ory Console](https://console.ory.com/current/projects/activity/events)A list of all supported routes can be found here:
src/components/ConsoleLink/console-routes.ts.
Please note that the syntax is like accessing a path in a JS object, but as a
string. If the route you want to reference is found in the console-routes.ts
file in the following way:
{
project: {
activity: {
events: {
route: "/projects/[project]/activity/events",
}
}
}
}Use <ConsoleLink route="project.activity.events" /> to reference it.
To add a new route, you need to add an entry inconsole-routes.ts
as well asconsole-nav-data.ts.
Testing
To test the documentation locally:
- Clone this repository.
- Navigate to the cloned repository and run
npm installto install all
dependencies. - Run the development server and test the changes you made using a fully
operational version of the documentation portal that runs on your machine.
Runnpm run start. - Create a production build to check for any technical issues, such as invalid
internal links. Runnpm run build.
Redirects
When the URL of a document changes, you must set up a redirect to preserve SEO
and prevent broken links. Without redirects, the original URL returns a 404
error, breaking existing links from external sites and causing search engines to
lose page authority.
The rule is: if the URL in the browser changes, add a redirect. If it doesn't,
no redirect is required.
Filenames don't always determine URLs. Ory documentation uses numbered prefixes
in filenames and sets URLs explicitly in the front matter. Renaming with no
other changes doesn't require a redirect because the final URL stays the same.
You must add a redirect when you
- change the
slugoridproperty in the document front matter - delete a document
- move a document to a different directory (if it changes the URL path)
How to add a redirect
Add redirects to the vercel.json file in the repository root. Use this format:
{
"redirects": [
{
"source": "/docs/old-path",
"destination": "/docs/new-path",
"permanent": false
}
]
}- Start with permanent: false (302 redirect) until you confirm the redirect
works in the preview or production environment. - Change to permanent: true (301 redirect) after you verify the redirect
functions correctly. - Test the redirect in the Vercel preview deployment before merging.
Formatting documentation
All documents and other files in this repository must be formatted with Prettier
using the Ory Prettier styles.
To format all relevant files, run these commands from the main directory of the
make format
git commit -a -m "chore: format"
git pushFor a better workflow, install the Prettier plugin for your editor:
Adding content to "Examples" page
The Quickstart overview
provides an overview of Ory quickstarts. To add a new example or modify existing
entries:
Open
examples-content.tsxinsrc/pages/_assets/.Copy the following snippet and append it to the correct array (either
official, community, or self-hosting examples):tsx{ title: "Protect a Page with Login: NextJs/React", //Your example title goes here language: "typescript", //The main programming language of your example author: "ory", //The author's GitHub handle tested: true, //Is the example in ory/examples or ory/docs and has automated tests? repo: "https://github.com/ory/docs/tree/master/code-examples/protect-page-login/nextjs", //The repo containing the example code docs: "https://www.ory.sh/docs/guides/protect-page-login/next.js", //Documentation for the example, can be README, blog article or similar },languagecan be one of: dart, django, docker, erlang, flutter, go, java,
javascript, kotlin, kubernetes, nextjs, nodejs, ory, php, python, react,
rescript, svelte, typescript, vue
Open a pull request with your changes.
CLI and API reference - auto-generated content
Ory documentation contains auto-generated content such as CLI and API
references. Documents of this type are generated from source code and are pushed
to this repository by an automated job.
As such, editing any of these documents in the Ory documentation repository
isn't the way to change or fix this content. Any changes you make will be
overwritten by the next push that follows the generation process.
Instead, find the lines in question in the source code of the Ory projects and
edit them there. For example, if you want to edit the documentation of the Ory
Kratos CLI, you must edit this file:
https://github.com/ory/kratos/blob/master/cmd/clidoc/main.go
The cmd/clidoc/main.go is the general path for all Ory projects.
The command to generate the CLI docs can be found here:
https://github.com/ory/x/blob/master/clidoc/generate.go#L96