• Stars
    star
    132
  • Rank 274,205 (Top 6 %)
  • Language
    TypeScript
  • License
    Apache License 2.0
  • Created over 6 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The Ory documentation

Ory Documentation

Chat | Newsletter

Documentation | Support this project!

Work in Open Source, Ory is hiring!

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:

  1. Use active voice and present tense.
  2. Always write in American English.
  3. Use zero conditional when talking about the cause-and-effect in software behavior.
  4. Use the right words to make sure that your message is clear and unambiguous. Don't use words like "should", "could", or "may".
  5. Don't use phrasal verbs, colloquialisms, and jargon.
  6. Don't refer to users in ways that imply their sex.
  7. Don't use contractions of Latin origins such as e.g or i.e.
  8. Remember to use articles (a, an, the) in your writing.
  9. Use common contractions such as aren't, don't, doesn't to 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.

Headings

  • Use sentence case for headings.
  • The highest heading level in documents is h2. Use h1 only when you override the document title.
  • The lowest heading level in documents is h4. If you absolutely need to add more heading levels, don't go lower than h5.
  • 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
---
  • id is 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.
  • title is 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 a h1 in the very first line following the front matter. Use sentence case.
  • sidebar_label represents the document title used in the sidebar (left navigation). Create a short document title that fits the sidebar width. Use sentence case.
  • slug is an optional property that allows you to customize the document URL. Use it to create more meaningful, SEO-friendly URLs.

Bolding, 'code formatting'

  • Use only code and bold formatting. Don't use any other formatting.
  • For inline code, wrap text in single backticks (`). For code blocks use three backticks (```)
  • Use code formatting for:
    • Commands, for example ory --help
    • File names and paths, for example file.txt, ~/Desktop/git/docs
    • Environment variables, for example CUSTOM_ENV_VAR
  • 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:

    Ory 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.

    [Some link](../path/to/file.mdx)
    

Code blocks

  • Always add a programming language identifier to code blocks. Ory documentation uses Prism syntax highlighting.

    ```json
    {some-JSON-code-here}
    ```
    
  • For command line examples, use shell as the programming language identifier. Don't put $ before the command.

    ```shell
    ory get identities
    ```
    
  • For Ory Permissions (Keto) relation tuples, use keto-relation-tuples language identifier, and for relationships use keto-relationships.

    ```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.

    ```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 ({}).
  • 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}"
/>
```
  • lang specifies the programming language the code is in
  • link is the file location displayed in the top part of the code block window
  • src is the direct link used to import the code (optional)
  • startAt , endAt are 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 _static folders.
    • In the _static directory, 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 named 1.png will be used in line 70, while the diagram 2.svg will be used in line 100.

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. ffmpeg will 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%.*}".mp4

Use 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} />
```

Testing

To test the documentation locally:

  1. Clone this repository.
  2. Navigate to the cloned repository and run npm install to install all dependencies.
  3. Run the development server and test the changes you made using a fully operational version of the documentation portal that runs on your machine. Run npm run start.
  4. Create a production build to check for any technical issues, such as invalid internal links. Run npm run build.

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 repository:

make format
git commit -a -m "chore: format"
git push

For a better workflow, install the Prettier plugin for your editor:

Adding content to "Examples" page

The "Examples" page provides an overview of Ory examples. To add a new example or modify existing entries:

  1. Open examples-content.tsx in src/pages/_assets/.

  2. Copy the following snippet and append it to the correct array (either official, community, or self-hosting examples):

    {
          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
        },
    • language can be one of: dart, django, docker, erlang, flutter, go, java, javascript, kotlin, kubernetes, nextjs, nodejs, ory, php, python, react, rescript, svelte, typescript, vue
  3. 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

More Repositories

1

hydra

OpenID Certifiedβ„’ OpenID Connect and OAuth Provider written in Go - cloud native, security-first, open source API security for your infrastructure. SDKs for any language. Works with Hardware Security Modules. Compatible with MITREid.
Go
14,588
star
2

kratos

Next-gen identity server (think Auth0, Okta, Firebase) with Ory-hardened authentication, MFA, FIDO2, TOTP, WebAuthn, profile management, identity schemas, social sign in, registration, account recovery, passwordless. Golang, headless, API-only - without templating or theming headaches. Available as a cloud service.
Go
8,361
star
3

keto

Open Source (Go) implementation of "Zanzibar: Google's Consistent, Global Authorization System". Ships gRPC, REST APIs, newSQL, and an easy and granular permission language. Supports ACL, RBAC, and other access models.
Go
4,745
star
4

dockertest

Write better integration tests! Dockertest helps you boot up ephermal docker images for your Go tests with minimal work.
Go
3,676
star
5

oathkeeper

A cloud native Identity & Access Proxy / API (IAP) and Access Control Decision API that authenticates, authorizes, and mutates incoming HTTP(s) requests. Inspired by the BeyondCorp / Zero Trust white paper. Written in Go.
Go
3,220
star
6

fosite

Extensible security first OAuth 2.0 and OpenID Connect SDK for Go.
Go
2,300
star
7

ladon

A SDK for access control policies: authorization for the microservice and IoT age. Inspired by AWS IAM policies. Written for Go.
Go
2,280
star
8

k8s

Kubernetes Helm Charts for the ORY ecosystem.
Mustache
330
star
9

kratos-selfservice-ui-node

TypeScript
278
star
10

hydra-login-consent-node

This is an ExpressJS reference implementation for the ORY Hydra User Login and Consent interface written in TypeScript and ExpressJS.
TypeScript
266
star
11

go-acc

Accurate Code Coverage reporting for Golang (Go)
Go
208
star
12

sdk

The place where ORY's SDKs are being auto-generated
PHP
137
star
13

examples-archive

THIS REPOSITORY IS NOT UP TO DATE. Different docker-based examples for ORY's services (Hydra, Keto, Oathkeeper).
Shell
129
star
14

graceful

A best practice http server set up that supports graceful shutdown
Go
123
star
15

examples

A curated collection of examples and solutions created and maintained by the Ory Community.
JavaScript
103
star
16

x

Libraries used in the Ory ecosystem
Go
86
star
17

elements

Ory Elements is a component library that makes building login, registration and account pages for Ory a breeze. Check out the components library on Chromatic https://www.chromatic.com/library?appId=63b58e306cfd32348fa48d50
TypeScript
85
star
18

herodot

A lightweight Go library for writing responses and errors to HTTP
Go
82
star
19

kratos-selfservice-ui-react-nextjs

A full reference implementation for designing your own login, registration, recovery, verification, ... pages using Ory Kratos' APIs.
TypeScript
81
star
20

network

Ory runs a global end-to-end security infrastructure for humans, robots, and servers. We build and use open source software.
80
star
21

kratos-selfservice-ui-react-native

A reference implementation of an app using ORY Kratos for auth (login), sign up (registration), profile settings (update password), MFA/2FA, account recovery (password reset), and more for React Native. This repository is available as an expo template!
TypeScript
68
star
22

fosite-example

Go
66
star
23

kratos-client-go

Shell
55
star
24

cli

Create bulk action scripts, automate your tasks, manage your projects, and seamlessly interact with the Ory Network using the Ory command line interface (CLI).
Go
42
star
25

hydra-consent-app-go

A simple consent app for Hydra written in Go - for Hydra =< 1.0.0
Go
41
star
26

jobs

Want to build the next generation identity stack? You've come to the right place!
37
star
27

hydra-consent-app-express

A simple nodejs consent app based on express - for Hydra =< 1.0.0
JavaScript
37
star
28

hydra-client-go

Shell
34
star
29

oathkeeper-maester

Kuberenetes CRD Controller for Ory Oathkeeper. ⚠️ Maintained by the community, not an official Ory project!
Go
33
star
30

osin-storage

PostgreSQL storage backend for RangelReale osin OAuth2
Go
33
star
31

hydra-maester

Kuberenetes CRD Controller for Ory Hydra. ⚠️ Maintained by the community, not an official Ory project!
Go
32
star
32

web

www.ory.sh
TypeScript
25
star
33

hydra-client-java

Java
25
star
34

kratos-nextjs-react-example

Add login, registration, account recovery (password reset), account verification (email verification), social sign in, multi-factor authentication to your Next.js / React App using Ory!
TypeScript
25
star
35

status

DEPRECATED
Markdown
21
star
36

closed-reference-notifier

A GitHub action to open an issue when GitHub references in your code are closed.
TypeScript
20
star
37

hydra-js

DOES NOT WORK WITH VERSIONS > 0.10.0 - A simple library to help you build node-based identity providers that work with Hydra.
JavaScript
18
star
38

go-convenience

Well-tested helpers for dealing with daily problems in Go.
Go
18
star
39

defcon-30-ctf

Go
17
star
40

meta

A place where we plan and schedule our open source activities and track cross-project and ory-wide issues
Shell
17
star
41

redux-saga-fetch

A simple wrapper that reduces boilerplate code when using redux-saga in combination with async backend calls.
TypeScript
16
star
42

hydra-client-php

PHP
15
star
43

integrations

TypeScript
14
star
44

kratos-client-php

PHP
14
star
45

keto-client-go

Shell
14
star
46

build-buf-action

A GitHub action to build and lint protobuf using buildbuf
Shell
13
star
47

encrypt-dir

A very simple cli helper that encrypts files in directories using AES-GCM (128bit)
Go
13
star
48

summit

This repository holds all material related to the Ory Summit, specifically the presentations.
11
star
49

common

Ory's cross-project go libraries, intended for internal use.
Go
11
star
50

client-go

Shell
11
star
51

docusaurus-template

DEPRECATED
JavaScript
10
star
52

works

This repository shows examples of practical solutions using Ory projects and other OSS
Go
10
star
53

oathkeeper-client-go

Shell
10
star
54

ladon-community

Go
9
star
55

ci

Automation and robots for Ory's CI and CD pipelines
Shell
7
star
56

kratos-client-js

Autogenerated kratos SDK.
7
star
57

keto-client-java

Java
7
star
58

kratos-client-rust

Autogenerated kratos SDK.
Rust
7
star
59

kratos-client-java

Java
6
star
60

oathkeeper-client-php

PHP
6
star
61

keto-client-php

PHP
6
star
62

client-dotnet

Autogenerated client SDK.
C#
6
star
63

hydra-auth0-consent-sdk

A NodeJS library for working with Auth0 as an Identity Provider
JavaScript
6
star
64

kratos-client-ruby

Autogenerated kratos SDK.
Ruby
6
star
65

ory-config

A small Web App for configuring Ory systems built in VueJs 2.x
Vue
6
star
66

ory-sdk-go

Go
6
star
67

kratos-client-dart

Autogenerated kratos SDK.
Dart
5
star
68

ory-sdk-archive

Shell
5
star
69

pagination

Go
5
star
70

client-php

PHP
5
star
71

milestone-action

JavaScript
5
star
72

eslint-config-ory-am-react

The ESLint configuration used by Ory (React specific)
JavaScript
5
star
73

themes

TypeScript
5
star
74

open-source-support

Are you looking for help above and beyond our community self service support?
5
star
75

kratos-maester

5
star
76

hydra-client-dart

Autogenerated hydra SDK.
Dart
4
star
77

hydra-client-js

Autogenerated hydra SDK.
4
star
78

homebrew-tap

Location for all of Ory's homebrew packages
Ruby
4
star
79

label-sync-action

JavaScript
4
star
80

summit-platform

TypeScript
4
star
81

kratos-client-python

Autogenerated kratos SDK.
Python
4
star
82

keto-maester

4
star
83

metrics-middleware

A simple metrics middleware for segment.io
Go
4
star
84

sdk-js

JavaScript
4
star
85

client-java

Java
4
star
86

client-js

Autogenerated client SDK.
4
star
87

eslint-config-ory-am

The ESLint configuration used by Ory
JavaScript
3
star
88

changelog

Ory Changelog Generator
JavaScript
3
star
89

scoop

3
star
90

ory-client-go

3
star
91

slack-invite

3
star
92

oathkeeper-client-dotnet

Autogenerated oathkeeper SDK.
C#
3
star
93

oathkeeper-client-js

Autogenerated oathkeeper SDK.
3
star
94

hydra-oracle-plugin

Go
3
star
95

hydra-client-ruby

Autogenerated hydra SDK.
Ruby
3
star
96

hydra-client-rust

Autogenerated hydra SDK.
Rust
3
star
97

release

Release infrastructure for ORY and related components
HTML
3
star
98

hydra-client-dotnet

Autogenerated hydra SDK.
C#
3
star
99

homebrew-kratos

Ruby
3
star
100

keto-client-python

Autogenerated keto SDK.
3
star