Skip to content

Commit

Permalink
fix: readd blog examples
Browse files Browse the repository at this point in the history
  • Loading branch information
vinckr committed Feb 18, 2025
1 parent 6c42361 commit 254c8b8
Show file tree
Hide file tree
Showing 198 changed files with 8,557 additions and 57 deletions.
78 changes: 28 additions & 50 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<!-- AUTO-GENERATED, DO NOT EDIT! -->
<!-- Please edit the original at https://github.com/ory/meta/blob/master/templates/repository/common/CONTRIBUTING.md -->

# Contribute to Ory Examples<!-- omit in toc -->
# Contribute to Ory $PROJECT<!-- omit in toc -->

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
Expand All @@ -22,8 +19,8 @@

## Introduction

_Please note_: We take Ory Examples's security and our users' trust very
seriously. If you believe you have found a security issue in Ory Examples,
_Please note_: We take Ory $PROJECT's security and our users' trust very
seriously. If you believe you have found a security issue in Ory $PROJECT,
please disclose it by contacting us at [email protected].

There are many ways in which you can contribute. The goal of this document is to
Expand All @@ -41,44 +38,44 @@ contributions and don't want a wall of rules to get in the way of that.
That said, if you want to ensure that a pull request is likely to be merged,
talk to us! You can find out our thoughts and ensure that your contribution
won't clash with Ory
Examples's direction. A great way to
$PROJECT's direction. A great way to
do this is via
[Ory Examples Discussions](https://github.com/orgs/ory/discussions)
[Ory $PROJECT Discussions]($DISCUSSIONS)
or the [Ory Chat](https://www.ory.sh/chat).

## FAQ

- I am new to the community. Where can I find the
[Ory Community Code of Conduct?](https://github.com/ory/examples/blob/master/CODE_OF_CONDUCT.md)
[Ory Community Code of Conduct?](https://github.com/$REPOSITORY/blob/master/CODE_OF_CONDUCT.md)

- I have a question. Where can I get
[answers to questions regarding Ory Examples?](#communication)
[answers to questions regarding Ory $PROJECT?](#communication)

- I would like to contribute but I am not sure how. Are there
[easy ways to contribute?](#how-can-i-contribute)
[Or good first issues?](https://github.com/search?l=&o=desc&q=label%3A%22help+wanted%22+label%3A%22good+first+issue%22+is%3Aopen+user%3Aory+user%3Aory-corp&s=updated&type=Issues)

- I want to talk to other Ory Examples users.
- I want to talk to other Ory $PROJECT users.
[How can I become a part of the community?](#communication)

- I would like to know what I am agreeing to when I contribute to Ory
Examples.
$PROJECT.
Does Ory have
[a Contributors License Agreement?](https://cla-assistant.io/ory/examples)
[a Contributors License Agreement?](https://cla-assistant.io/$REPOSITORY)

- I would like updates about new versions of Ory Examples.
- I would like updates about new versions of Ory $PROJECT.
[How are new releases announced?](https://www.ory.sh/l/sign-up-newsletter)

## How can I contribute?

If you want to start to contribute code right away, take a look at the
[list of good first issues](https://github.com/ory/examples/labels/good%20first%20issue).
[list of good first issues](https://github.com/$REPOSITORY/labels/good%20first%20issue).

There are many other ways you can contribute. Here are a few things you can do
to help out:

- **Give us a star.** It may not seem like much, but it really makes a
difference. This is something that everyone can do to help out Ory Examples.
difference. This is something that everyone can do to help out Ory $PROJECT.
Github stars help the project gain visibility and stand out.

- **Join the community.** Sometimes helping people can be as easy as listening
Expand All @@ -93,7 +90,7 @@ to help out:
help, please share it! Bonus: You get GitHub achievements for answered
discussions.

- **Help with open issues.** We have a lot of open issues for Ory Examples and
- **Help with open issues.** We have a lot of open issues for Ory $PROJECT and
some of them may lack necessary information, some are duplicates of older
issues. You can help out by guiding people through the process of filling out
the issue template, asking for clarifying information or pointing them to
Expand All @@ -112,53 +109,34 @@ to help out:
We use [Slack](https://www.ory.sh/chat). You are welcome to drop in and ask
questions, discuss bugs and feature requests, talk to other users of Ory, etc.

Check out [Ory Examples Discussions](https://github.com/orgs/ory/discussions). This is a great place for
Check out [Ory $PROJECT Discussions]($DISCUSSIONS). This is a great place for
in-depth discussions and lots of code examples, logs and similar data.

You can also join our community calls if you want to speak to the Ory team
directly or ask some questions. You can find more info and participate in
[Slack](https://www.ory.sh/chat) in the #community-call channel.

If you want to receive regular notifications about updates to Ory Examples,
If you want to receive regular notifications about updates to Ory $PROJECT,
consider joining the mailing list. We will _only_ send you vital information on
the projects that you are interested in.

Also, [follow us on Twitter](https://twitter.com/orycorp).

## Contribute examples
## Contribute example or community projects

One of the most impactful ways to contribute is by adding examples. You can find
an overview of examples using Ory services on the
[documentation examples page](https://www.ory.sh/docs/examples). Source code for
examples can be found in most cases in the
[ory/examples](https://github.com/ory/examples) repository.
One of the most impactful ways to contribute is by adding code examples or other Ory-related code.
You can find an overview of community code in the [awesome-ory](https://github.com/ory/awesome-ory) repository.

_If you would like to contribute a new example, we would love to hear from you!_

Please [open an issue](https://github.com/ory/examples/issues/new/choose) to
describe your example before you start working on it. We would love to provide
guidance to make for a pleasant contribution experience. Go through this
checklist to contribute an example:

1. Create a GitHub issue proposing a new example and make sure it's different
from an existing one.
1. Fork the repo and create a feature branch off of `master` so that changes do
not get mixed up.
1. Add a descriptive prefix to commits. This ensures a uniform commit history
and helps structure the changelog. Please refer to this
[Convential Commits configuration](https://github.com/ory/examples/blob/master/.github/workflows/conventional_commits.yml)
for the list of accepted prefixes. You can read more about the Conventional
Commit specification
[at their site](https://www.conventionalcommits.org/en/v1.0.0/).
1. Create a `README.md` that explains how to use the example. (Use
[the README template](https://github.com/ory/examples/blob/master/_common/README.md)).
1. Open a pull request and maintainers will review and merge your example.
Please [open a pull request at awesome-ory](https://github.com/ory/awesome-ory/) to
add your example or Ory-related project to the awesome-ory README.

## Contribute code

Unless you are fixing a known bug, we **strongly** recommend discussing it with
the core team via a GitHub issue or [in our chat](https://www.ory.sh/chat)
before getting started to ensure your work is consistent with Ory Examples's
before getting started to ensure your work is consistent with Ory $PROJECT's
roadmap and architecture.

All contributions are made via pull requests. To make a pull request, you will
Expand All @@ -176,7 +154,7 @@ request, go through this checklist:
1. Run `make format`
1. Add a descriptive prefix to commits. This ensures a uniform commit history
and helps structure the changelog. Please refer to this
[Convential Commits configuration](https://github.com/ory/examples/blob/master/.github/workflows/conventional_commits.yml)
[Convential Commits configuration](https://github.com/$REPOSITORY/blob/master/.github/workflows/conventional_commits.yml)
for the list of accepted prefixes. You can read more about the Conventional
Commit specification
[at their site](https://www.conventionalcommits.org/en/v1.0.0/).
Expand All @@ -185,7 +163,7 @@ If a pull request is not ready to be reviewed yet
[it should be marked as a "Draft"](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request).

Before your contributions can be reviewed you need to sign our
[Contributor License Agreement](https://cla-assistant.io/ory/examples).
[Contributor License Agreement](https://cla-assistant.io/$REPOSITORY).

This agreement defines the terms under which your code is contributed to Ory.
More specifically it declares that you have the right to, and actually do, grant
Expand All @@ -205,7 +183,7 @@ Pull requests eligible for review
3. document the changes in the code and/or the project's documentation;
4. pass the CI pipeline;
5. have signed our
[Contributor License Agreement](https://cla-assistant.io/ory/examples);
[Contributor License Agreement](https://cla-assistant.io/$REPOSITORY);
6. include a proper git commit message following the
[Conventional Commit Specification](https://www.conventionalcommits.org/en/v1.0.0/).

Expand Down Expand Up @@ -236,10 +214,10 @@ Please run `make format` to format all source code following the Ory standard.

```bash
# First you clone the original repository
git clone [email protected]:ory/ory/examples.git
git clone [email protected]:ory/$REPOSITORY.git

# Next you add a git remote that is your fork:
git remote add fork [email protected]:<YOUR-GITHUB-USERNAME-HERE>/ory/examples.git
git remote add fork [email protected]:<YOUR-GITHUB-USERNAME-HERE>/$REPOSITORY.git

# Next you fetch the latest changes from origin for master:
git fetch origin
Expand All @@ -264,7 +242,7 @@ Now go to the project's GitHub Pull Request page and click "New pull request"
Whether you are a regular contributor or a newcomer, we care about making this
community a safe place for you and we've got your back.

[Ory Community Code of Conduct](https://github.com/ory/examples/blob/master/CODE_OF_CONDUCT.md)
[Ory Community Code of Conduct](https://github.com/$REPOSITORY/blob/master/CODE_OF_CONDUCT.md)

We welcome discussion about creating a welcoming, safe, and productive
environment for the community. If you have any questions, feedback, or concerns
Expand Down
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# Awesome Ory

[![Awesome](https://awesome.re/badge-flat2.svg)](https://awesome.re)
[![Docs](https://img.shields.io/badge/docs-ory.sh-%233B4B6C "Ory Documentation")](https://ory.sh/docs)
[![Docs](https://img.shields.io/badge/chat-slack.ory.sh-%234B1B6C "Ory Community Slack")](https://slack.ory.sh/)
# Awesome Ory [![Awesome](https://awesome.re/badge-flat2.svg)](https://awesome.re)

[<img src="./assets/logo512.png" align="right" width="350">](https://ory.sh/)

An awesome list of the [Ory ecosystem](https://github.com/ory/). 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.

[![Docs](https://img.shields.io/badge/docs-ory.sh-%233B4B6C "Ory Documentation")](https://ory.sh/docs)
[![Docs](https://img.shields.io/badge/chat-slack.ory.sh-%234B1B6C "Ory Community Slack")](https://slack.ory.sh/)

If you have any questions or suggestions [open a discussion](https://github.com/ory/examples/discussions), or join the [Ory Chat](https://slack.ory.sh/)!

See CONTRIBUTING.md for pointers on how to contribute.
See [CONTRIBUTING.md](CONTRIBUTING.md) for pointers on how to contribute.

## Contents

Expand Down Expand Up @@ -65,7 +64,7 @@ Developer resources and forums for discussing Ory and meeting other users
- [StackOverflow](https://stackoverflow.com/questions/tagged/ory) - StackOverflow questions tagged with `ory`
- [Twitter](https://twitter.com/orycorp) - Official Ory Twitter account

- Ory Support: [Get enterprise-grade support](https://ory.sh/contact) - directly from the Ory maintainer team
- Ory Support 👉 [Enterprise-grade support directly from the Ory maintainers](https://ory.sh/contact)

## Blog posts

Expand Down
29 changes: 29 additions & 0 deletions django-ory-cloud/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/ubuntu
{
"name": "Ubuntu",
"image": "mcr.microsoft.com/devcontainers/base:jammy",
"features": {
"ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/devcontainers/features/python:1": {},
"ghcr.io/rocker-org/devcontainer-features/apt-packages:1": {
"packages": "make"
},
"ghcr.io/devcontainers-contrib/features/poetry:1": {}
}

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "uname -a",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
7 changes: 7 additions & 0 deletions django-ory-cloud/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.bin
*.pyc
*/db.sqlite3
node_modules
/test-results/
/playwright-report/
/playwright/.cache/
1 change: 1 addition & 0 deletions django-ory-cloud/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
mysite/templates/base.html
17 changes: 17 additions & 0 deletions django-ory-cloud/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
format:
echo "TODO: add Python formatter"

install: node_modules poetry.lock
poetry install

.PHONY: test
test: install .bin/ory
./test.sh

.bin/ory: Makefile
curl https://raw.githubusercontent.com/ory/meta/master/install.sh | sh -s -- -d -b .bin ory v0.1.48

node_modules: package-lock.json
npm ci
npx playwright install --with-deps chromium
touch node_modules
55 changes: 55 additions & 0 deletions django-ory-cloud/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Secure a Django application using Ory Cloud

This repo demonstrates how you can use Ory Cloud or Ory Kratos with Django apps.
This app is not for production use and serves as an example of integration.

Read the tutorial on the Ory blog:

- [Add Authentication to your Django Application](https://www.ory.sh/secure-django-app-using-ory/)

## Overview

- Generated using the default `django-admin startproject` command.
- Uses sqlite3 as the database backend.
- Consider using
[django-cookiecutter](https://github.com/cookiecutter/cookiecutter-django)

## Develop

### Prerequisites

1. Python 3.10
1. [Poetry](https://python-poetry.org/) - Python dependency manager.
1. [Docker](https://docs.docker.com/get-docker/) (if you want to self-host Ory
Kratos)

## Environment variables

```bash
export ORY_SDK_URL=https://playground.projects.oryapis.com
export ORY_UI_URL=https://playground.projects.oryapis.com/ui
```

## Run locally

```bash
git clone [email protected]:ory/examples
cd examples/django-ory-cloud
poetry install
cd mysite
poetry run python manage.py migrate
poetry run python manage.py runserver
```

Open http://127.0.0.1:8000 for testing

## Contribute

Feel free to
[open a discussion](https://github.com/ory/examples/discussions/new) to provide
feedback or talk about ideas, or
[open an issue](https://github.com/ory/examples/issues/new) if you want to add
your example to the repository or encounter a bug. You can contribute to Ory in
many ways, see the
[Ory Contributing Guidelines](https://www.ory.sh/docs/ecosystem/contributing)
for more information.
Loading

0 comments on commit 254c8b8

Please sign in to comment.