Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update docusaurus to 3.X #1686

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
3b56242
chore: update docusaurus to 3.X
jonas-jonas Mar 22, 2024
f85c4b3
chore: move the message descriptions to their own file
jonas-jonas Apr 19, 2024
2f9b137
chore: format
jonas-jonas Apr 20, 2024
d67298e
Merge branch 'master' into jonas-jonas/moveMessageDescriptionToOwnFile
jonas-jonas Apr 20, 2024
ad77764
Merge remote-tracking branch 'origin/master' into jonas-jonas/updateD…
jonas-jonas Apr 20, 2024
860972f
Merge remote-tracking branch 'origin/jonas-jonas/moveMessageDescripti…
jonas-jonas Apr 20, 2024
5b8afdd
Merge remote-tracking branch 'origin/master' into jonas-jonas/updateD…
jonas-jonas Apr 24, 2024
7e29b39
Merge remote-tracking branch 'origin/master' into jonas-jonas/updateD…
jonas-jonas Apr 24, 2024
c5496fe
fix: compilation issues
jonas-jonas Apr 24, 2024
5ff80ab
chore: formatting
jonas-jonas Apr 24, 2024
90008f7
chore: upgrade versions in workflows
jonas-jonas Apr 24, 2024
424981f
Merge branch 'master' into jonas-jonas/updateDocusaurus
jonas-jonas Apr 25, 2024
32c3d83
chore: downgrade mermaid to 9.3
jonas-jonas Apr 30, 2024
656db1a
chore: format
jonas-jonas Apr 30, 2024
1a411a4
chore: add sharp??
jonas-jonas Apr 30, 2024
40bf8e9
chore: format
jonas-jonas May 2, 2024
95fba87
Merge remote-tracking branch 'origin/master' into jonas-jonas/updateD…
jonas-jonas May 31, 2024
c5ea299
chore: u
jonas-jonas May 31, 2024
092d0cd
fix: visual regressions
jonas-jonas May 31, 2024
40f5dad
chore: format
jonas-jonas Jun 3, 2024
02f0bc1
Merge branch 'master' into jonas-jonas/updateDocusaurus
jonas-jonas Jun 10, 2024
ec270a6
chore: cleanup
jonas-jonas Jun 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/argos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:
jonas-jonas marked this conversation as resolved.
Show resolved Hide resolved

jobs:
take-screenshots:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "17.x"
node-version: "20.x"
cache: "npm"
- run: npm install
- name: Test Build
Expand Down
60 changes: 28 additions & 32 deletions code-examples/protect-page-login/expressjs/bin/www
Original file line number Diff line number Diff line change
Expand Up @@ -4,76 +4,74 @@
* Module dependencies.
*/

var app = require('../app');
var debug = require('debug')('e2:server');
var http = require('http');
var app = require("../app")
var debug = require("debug")("e2:server")
var http = require("http")

/**
* Get port from environment and store in Express.
*/

var port = normalizePort(process.env.PORT || '3000');
app.set('port', port);
var port = normalizePort(process.env.PORT || "3000")
app.set("port", port)

/**
* Create HTTP server.
*/

var server = http.createServer(app);
var server = http.createServer(app)

/**
* Listen on provided port, on all network interfaces.
*/

server.listen(port);
server.on('error', onError);
server.on('listening', onListening);
server.listen(port)
server.on("error", onError)
server.on("listening", onListening)

/**
* Normalize a port into a number, string, or false.
*/

function normalizePort(val) {
var port = parseInt(val, 10);
var port = parseInt(val, 10)

if (isNaN(port)) {
// named pipe
return val;
return val
}

if (port >= 0) {
// port number
return port;
return port
}

return false;
return false
}

/**
* Event listener for HTTP server "error" event.
*/

function onError(error) {
if (error.syscall !== 'listen') {
throw error;
if (error.syscall !== "listen") {
throw error
}

var bind = typeof port === 'string'
? 'Pipe ' + port
: 'Port ' + port;
var bind = typeof port === "string" ? "Pipe " + port : "Port " + port

// handle specific listen errors with friendly messages
switch (error.code) {
case 'EACCES':
console.error(bind + ' requires elevated privileges');
process.exit(1);
break;
case 'EADDRINUSE':
console.error(bind + ' is already in use');
process.exit(1);
break;
case "EACCES":
console.error(bind + " requires elevated privileges")
process.exit(1)
break
case "EADDRINUSE":
console.error(bind + " is already in use")
process.exit(1)
break
default:
throw error;
throw error
}
}

Expand All @@ -82,9 +80,7 @@ function onError(error) {
*/

function onListening() {
var addr = server.address();
var bind = typeof addr === 'string'
? 'pipe ' + addr
: 'port ' + addr.port;
debug('Listening on ' + bind);
var addr = server.address()
var bind = typeof addr === "string" ? "pipe " + addr : "port " + addr.port
debug("Listening on " + bind)
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
body {
padding: 50px;
font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
font:
14px "Lucida Grande",
Helvetica,
Arial,
sans-serif;
}

a {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html>
<head>
<!--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,15 @@
border-radius: 5px;
padding: 0.75rem;
font-size: 1.1rem;
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
Bitstream Vera Sans Mono, Courier New, monospace;
font-family:
Menlo,
Monaco,
Lucida Console,
Liberation Mono,
DejaVu Sans Mono,
Bitstream Vera Sans Mono,
Courier New,
monospace;
}

.grid {
Expand All @@ -81,7 +88,9 @@
text-decoration: none;
border: 1px solid #eaeaea;
border-radius: 10px;
transition: color 0.15s ease, border-color 0.15s ease;
transition:
color 0.15s ease,
border-color 0.15s ease;
max-width: 300px;
}

Expand Down
14 changes: 12 additions & 2 deletions code-examples/protect-page-login/nextjs-12/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@ html,
body {
padding: 0;
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
font-family:
-apple-system,
BlinkMacSystemFont,
Segoe UI,
Roboto,
Oxygen,
Ubuntu,
Cantarell,
Fira Sans,
Droid Sans,
Helvetica Neue,
sans-serif;
}

a {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@
border-radius: var(--border-radius);
background: rgba(var(--card-rgb), 0);
border: 1px solid rgba(var(--card-border-rgb), 0);
transition: background 200ms, border 200ms;
transition:
background 200ms,
border 200ms;
}

.card span {
Expand Down
2 changes: 1 addition & 1 deletion code-examples/protect-page-login/react/public/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
Expand Down
2 changes: 1 addition & 1 deletion code-examples/protect-page-login/vue/public/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="">
<head>
<meta charset="utf-8" />
Expand Down
2 changes: 1 addition & 1 deletion docs/_common/install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ import CodeBlock from '@theme/CodeBlock'
If you wish to compile the binary yourself, you need to install and set up [Go 1.17+](https://golang.org/) and add `$GOPATH/bin`
to your `$PATH`.

:::warning
:::danger

Please note that this will check out the latest commit, which might be not yet released and unstable.

Expand Down
2 changes: 1 addition & 1 deletion docs/_common/jsonnetwarning.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
:::warning
:::danger

Don't save secrets such as API keys, credentials, or personal data directly in Jsonnet code snippets. Jsonnet code snippets used
for data mapping aren't stored in an encrypted format in Ory Network.
Expand Down
2 changes: 1 addition & 1 deletion docs/_common/secure.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
:::warning
:::danger

The APIs of Ory open-source Servers don't come with integrated access control. This means that all requests sent to their APIs are
considered authenticated, authorized, and will be executed. Leaving the APIs in this state can lead to severe security risks.
Expand Down
4 changes: 2 additions & 2 deletions docs/actions/session.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Ory automatically activates the `session` action when a user signs up using a so

## Toggle action

:::warning
:::danger

This action modifies the HTTP response. As a result, no other hooks can be executed after the `session` action. If you want to
trigger multiple actions that modify the HTTP response in your setup, make sure that `session` is triggered last.
Expand Down Expand Up @@ -61,7 +61,7 @@ ory patch identity-config {project-id} \

The hook sends a `Set-Cookie` HTTP header which contains the session cookie. The user is signed in immediately.

:::warning
:::danger

Using this job as part of your post-registration workflow makes your system vulnerable to Account Enumeration Attacks because a
threat agent can distinguish between existing and non-existing accounts by checking if Set-Cookie was sent as part of the
Expand Down
2 changes: 1 addition & 1 deletion docs/ecosystem/api-design.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Design
---

This document provides a summary of Ory's REST design with topics like pagination and date formats. If you're interested in Ory's
API design, check out the [REST API design guidelines](../open-source/guidelines/rest-api-guidelines.mdx).
API design, check out the [REST API design guidelines](../open-source/guidelines/rest-api-guidelines.md).

## Date format

Expand Down
16 changes: 8 additions & 8 deletions docs/getting-started/integrate-auth/01_go.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ validate if the user is allowed to access the application.

Add the code to the `main.go` file:

```mdx-code-block title="main.go"
```mdx-code-block
import mainGo from '!!raw-loader!../../../code-examples/protect-page-login/go/main.go'
import CodeBlock from '@theme/CodeBlock'

<CodeBlock language="go">{mainGo}</CodeBlock>
<CodeBlock language="go" title="main.go">{mainGo}</CodeBlock>
```

## Validate and login
Expand All @@ -74,10 +74,10 @@ is not authenticated or the session expired, the request is redirected for login

To create the middleware, add the code to the `middleware.go` file:

```mdx-code-block title="middleware.go"
```mdx-code-block
import middlewareGo from '!!raw-loader!../../../code-examples/protect-page-login/go/middleware.go'

<CodeBlock language="go">{middlewareGo}</CodeBlock>
<CodeBlock language="go" title="middleware.go">{middlewareGo}</CodeBlock>
```

## The protected page
Expand All @@ -86,18 +86,18 @@ As the final step, create a `Dashboard` page that's presented to signed-in users

1. Create the `dashboardHandler` that renders the page with the session data. Add this code to the `handler.go` file:

```mdx-code-block title="handler.go"
```mdx-code-block
import handlerGo from '!!raw-loader!../../../code-examples/protect-page-login/go/handler.go'

<CodeBlock language="go">{handlerGo}</CodeBlock>
<CodeBlock language="go" title="handler.go">{handlerGo}</CodeBlock>
```

2. To present the data to the user, create the `Dashboard` HTML page. Add this code to the `index.html` file:

```mdx-code-block title="index.html"
```mdx-code-block
import index from '!!raw-loader!../../../code-examples/protect-page-login/go/index.html'

<CodeBlock language="html">{index}</CodeBlock>
<CodeBlock language="html" title="index.html">{index}</CodeBlock>
```

## Test your application
Expand Down
8 changes: 4 additions & 4 deletions docs/getting-started/integrate-auth/05_php.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ This is a working example of basic `index.php` script which creates an Ory clien
use of [Before Route Middlewares](https://github.com/bramus/router#before-router-middlewares) to validate if the user is allowed
to view the Dashboard.

```mdx-code-block title="index.php"
```mdx-code-block
import indexPHP from '!!raw-loader!../../../code-examples/protect-page-login/php/index.php'
import CodeBlock from '@theme/CodeBlock'

<CodeBlock language="php">{indexPHP}</CodeBlock>
<CodeBlock language="php" title="index.php">{indexPHP}</CodeBlock>
```

## Validate and login
Expand All @@ -76,10 +76,10 @@ session data.

This is accomplished by the simple `App` class stored in the `app.php` file:

```mdx-code-block title="app.php"
```mdx-code-block
import appPHP from '!!raw-loader!../../../code-examples/protect-page-login/php/app.php'

<CodeBlock language="php">{appPHP}</CodeBlock>
<CodeBlock language="php" title="app.php">{appPHP}</CodeBlock>
```

## Run your app
Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started/integrate-auth/10_expressjs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ This requires the express app (`npm run start`) to run on port 3000. The browser
Next we add a session check to the default home page of the example application. The highlighted code is what we added to check
whether the user is signed in, and redirect them to the login page if not:

```mdx-code-block title="routes/index.js"
```mdx-code-block
import homePage from '!!raw-loader!../../../code-examples/protect-page-login/expressjs/routes/index.js'
import CodeBlock from '@theme/CodeBlock'

<CodeBlock language="js">{homePage}</CodeBlock>
<CodeBlock language="js" title="routes/index.js">{homePage}</CodeBlock>
```

## Run your Express.js app
Expand Down