Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,20 @@
Example applications and integrations for [Authorizer](https://authorizer.dev) — the open-source, self-hosted authentication and authorization server.

> Authorizer v2 server is configured entirely via CLI flags (no `.env` / OS env vars), e.g.
> `./authorizer --database-type sqlite --database-url authorizer.db --admin-secret <secret>`
>
> ```bash
> ./authorizer \
> --database-type sqlite --database-url authorizer.db \
> --url http://localhost:8080 \
> --jwt-type HS256 --jwt-secret <jwt-secret> \
> --encryption-key "$(openssl rand -hex 32)" \
> --client-id <client-id> --client-secret <client-secret> \
> --admin-secret <admin-secret>
> ```
>
> All of the above are required as of 2.4.0 — the server exits at boot if any
> is missing. `--url` is this server's own address (not the apps allowed to
> call it, which is `--allowed-origins`).

## Examples

Expand Down
1 change: 0 additions & 1 deletion with-agent-permissions/mcp-agent.mjs
Original file line numberDiff line numberDiff line change
Expand Up@@ -187,7 +187,6 @@ function mcpArgs(bearer) {
`--client-secret=${CLIENT_SECRET}`,
`--url=${BASE}`,
`--mcp-bearer=${bearer}`,
`--mcp-authorizer-url=${BASE}`,
];
}

Expand Down
15 changes: 14 additions & 1 deletion with-express-js/README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,7 +24,20 @@ Node does not, so a server-side caller has to send it or every validation
fails with a `403` before the token is ever looked at.

> Authorizer v2 server is configured entirely via CLI flags (no `.env` / OS env vars), e.g.
> `./authorizer --database-type sqlite --database-url authorizer.db --admin-secret <secret>`
>
> ```bash
> ./authorizer \
> --database-type sqlite --database-url authorizer.db \
> --url http://localhost:8080 \
> --jwt-type HS256 --jwt-secret <jwt-secret> \
> --encryption-key "$(openssl rand -hex 32)" \
> --client-id <client-id> --client-secret <client-secret> \
> --admin-secret <admin-secret>
> ```
>
> All of the above are required as of 2.4.0 — the server exits at boot if any
> is missing. `--url` is this server's own address (not the apps allowed to
> call it, which is `--allowed-origins`).

## Run

Expand Down
15 changes: 14 additions & 1 deletion with-gatsbyjs/README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -17,7 +17,20 @@
> **Note:** This example uses Gatsby 4, whose native dependencies (`lmdb-store`) do not compile on Node.js 20+. Use Node.js 16–18 to run it.

> Authorizer v2 server is configured entirely via CLI flags (no `.env` / OS env vars), e.g.
> `./authorizer --database-type sqlite --database-url authorizer.db --admin-secret <secret>`
>
> ```bash
> ./authorizer \
> --database-type sqlite --database-url authorizer.db \
> --url http://localhost:8080 \
> --jwt-type HS256 --jwt-secret <jwt-secret> \
> --encryption-key "$(openssl rand -hex 32)" \
> --client-id <client-id> --client-secret <client-secret> \
> --admin-secret <admin-secret>
> ```
>
> All of the above are required as of 2.4.0 — the server exits at boot if any
> is missing. `--url` is this server's own address (not the apps allowed to
> call it, which is `--allowed-origins`).

# Using Authorizer with Gatsby

Expand Down
2 changes: 2 additions & 0 deletions with-k8s-tokenreview/k8s/authorizer.yaml
Original file line numberDiff line numberDiff line change
Expand Up@@ -37,6 +37,8 @@ spec:
args:
- --database-type=sqlite
- --database-url=/data/authorizer.db
# Required as of 2.4.0 — the server exits at boot without it.
- --url=http://localhost:8080
- --admin-secret=admin
- --client-id=kbyuFDidLLm280LIwVFiazOqjO3ty8KH
- --client-secret=60Op4HFM0I8ajz0WdiStAbziZ-VFQttXuxixHHs2R7r7-CW8GR79l-mmLqMhc-Sa
Expand Down
15 changes: 14 additions & 1 deletion with-nextjs-13/README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,7 +21,20 @@ import '@authorizerdev/authorizer-react/styles.css';
```

> Authorizer v2 server is configured entirely via CLI flags (no `.env` / OS env vars), e.g.
> `./authorizer --database-type sqlite --database-url authorizer.db --admin-secret <secret>`
>
> ```bash
> ./authorizer \
> --database-type sqlite --database-url authorizer.db \
> --url http://localhost:8080 \
> --jwt-type HS256 --jwt-secret <jwt-secret> \
> --encryption-key "$(openssl rand -hex 32)" \
> --client-id <client-id> --client-secret <client-secret> \
> --admin-secret <admin-secret>
> ```
>
> All of the above are required as of 2.4.0 — the server exits at boot if any
> is missing. `--url` is this server's own address (not the apps allowed to
> call it, which is `--allowed-origins`).

## Run

Expand Down
15 changes: 14 additions & 1 deletion with-nextjs/README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -21,7 +21,20 @@ import '@authorizerdev/authorizer-react/styles.css';
```

> Authorizer v2 server is configured entirely via CLI flags (no `.env` / OS env vars), e.g.
> `./authorizer --database-type sqlite --database-url authorizer.db --admin-secret <secret>`
>
> ```bash
> ./authorizer \
> --database-type sqlite --database-url authorizer.db \
> --url http://localhost:8080 \
> --jwt-type HS256 --jwt-secret <jwt-secret> \
> --encryption-key "$(openssl rand -hex 32)" \
> --client-id <client-id> --client-secret <client-secret> \
> --admin-secret <admin-secret>
> ```
>
> All of the above are required as of 2.4.0 — the server exits at boot if any
> is missing. `--url` is this server's own address (not the apps allowed to
> call it, which is `--allowed-origins`).

## Run

Expand Down
2 changes: 2 additions & 0 deletions with-org-saml/docker-compose.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,6 +22,8 @@ services:
# /authorizer, which the image chowns to that uid. Demo-only: the data
# goes away with the container.
- --database-url=/authorizer/authorizer.db
# Required as of 2.4.0 — the server exits at boot without it.
- --url=http://localhost:8080
- --jwt-type=HS256
# Obviously-fake dev secrets — change all of these outside a local demo.
- --jwt-secret=dev-jwt-secret-CHANGE-ME
Expand Down
2 changes: 2 additions & 0 deletions with-org-sso-oidc/docker-compose.yml
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,6 +23,8 @@ services:
# /authorizer, which the image chowns to that uid. Demo-only: the data
# goes away with the container.
- --database-url=/authorizer/authorizer.db
# Required as of 2.4.0 — the server exits at boot without it.
- --url=http://localhost:8080
- --jwt-type=HS256
# Obviously-fake dev secrets — change all of these outside a local demo.
- --jwt-secret=dev-jwt-secret-CHANGE-ME
Expand Down
15 changes: 14 additions & 1 deletion with-react-native-expo/README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,7 +14,20 @@ const authorizerURL = 'https://your-instance.example.com'; // Base URL of your A
Also add the app's redirect URI (printed on startup) to your client's authorized redirect URLs.

> Authorizer v2 server is configured entirely via CLI flags (no `.env` / OS env vars), e.g.
> `./authorizer --database-type sqlite --database-url authorizer.db --admin-secret <secret>`
>
> ```bash
> ./authorizer \
> --database-type sqlite --database-url authorizer.db \
> --url http://localhost:8080 \
> --jwt-type HS256 --jwt-secret <jwt-secret> \
> --encryption-key "$(openssl rand -hex 32)" \
> --client-id <client-id> --client-secret <client-secret> \
> --admin-secret <admin-secret>
> ```
>
> All of the above are required as of 2.4.0 — the server exits at boot if any
> is missing. `--url` is this server's own address (not the apps allowed to
> call it, which is `--allowed-origins`).

## Run

Expand Down
15 changes: 14 additions & 1 deletion with-react/README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -23,7 +23,20 @@ import '@authorizerdev/authorizer-react/styles.css';
```

> Authorizer v2 server is configured entirely via CLI flags (no `.env` / OS env vars), e.g.
> `./authorizer --database-type sqlite --database-url authorizer.db --admin-secret <secret>`
>
> ```bash
> ./authorizer \
> --database-type sqlite --database-url authorizer.db \
> --url http://localhost:8080 \
> --jwt-type HS256 --jwt-secret <jwt-secret> \
> --encryption-key "$(openssl rand -hex 32)" \
> --client-id <client-id> --client-secret <client-secret> \
> --admin-secret <admin-secret>
> ```
>
> All of the above are required as of 2.4.0 — the server exits at boot if any
> is missing. `--url` is this server's own address (not the apps allowed to
> call it, which is `--allowed-origins`).

## Local Setup

Expand Down
15 changes: 14 additions & 1 deletion with-svelte-kit/README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -17,7 +17,20 @@ Update the provider in `src/routes/+layout.svelte` with your instance details:
```

> Authorizer v2 server is configured entirely via CLI flags (no `.env` / OS env vars), e.g.
> `./authorizer --database-type sqlite --database-url authorizer.db --admin-secret <secret>`
>
> ```bash
> ./authorizer \
> --database-type sqlite --database-url authorizer.db \
> --url http://localhost:8080 \
> --jwt-type HS256 --jwt-secret <jwt-secret> \
> --encryption-key "$(openssl rand -hex 32)" \
> --client-id <client-id> --client-secret <client-secret> \
> --admin-secret <admin-secret>
> ```
>
> All of the above are required as of 2.4.0 — the server exits at boot if any
> is missing. `--url` is this server's own address (not the apps allowed to
> call it, which is `--allowed-origins`).

## Developing

Expand Down
15 changes: 14 additions & 1 deletion with-svelte-routing/README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -17,7 +17,20 @@ Update the provider in `src/App.svelte` with your instance details:
```

> Authorizer v2 server is configured entirely via CLI flags (no `.env` / OS env vars), e.g.
> `./authorizer --database-type sqlite --database-url authorizer.db --admin-secret <secret>`
>
> ```bash
> ./authorizer \
> --database-type sqlite --database-url authorizer.db \
> --url http://localhost:8080 \
> --jwt-type HS256 --jwt-secret <jwt-secret> \
> --encryption-key "$(openssl rand -hex 32)" \
> --client-id <client-id> --client-secret <client-secret> \
> --admin-secret <admin-secret>
> ```
>
> All of the above are required as of 2.4.0 — the server exits at boot if any
> is missing. `--url` is this server's own address (not the apps allowed to
> call it, which is `--allowed-origins`).

## Run

Expand Down
15 changes: 14 additions & 1 deletion with-vanilla-js-custom-ui/README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,20 @@ const authorizerRef = new authorizerdev.Authorizer({
```

> Authorizer v2 server is configured entirely via CLI flags (no `.env` / OS env vars), e.g.
> `./authorizer --database-type sqlite --database-url authorizer.db --admin-secret <secret>`
>
> ```bash
> ./authorizer \
> --database-type sqlite --database-url authorizer.db \
> --url http://localhost:8080 \
> --jwt-type HS256 --jwt-secret <jwt-secret> \
> --encryption-key "$(openssl rand -hex 32)" \
> --client-id <client-id> --client-secret <client-secret> \
> --admin-secret <admin-secret>
> ```
>
> All of the above are required as of 2.4.0 — the server exits at boot if any
> is missing. `--url` is this server's own address (not the apps allowed to
> call it, which is `--allowed-origins`).

## Getting started

Expand Down
15 changes: 14 additions & 1 deletion with-vanilla-js/README.md
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,7 +15,20 @@ const authorizerRef = new authorizerdev.Authorizer({
```

> Authorizer v2 server is configured entirely via CLI flags (no `.env` / OS env vars), e.g.
> `./authorizer --database-type sqlite --database-url authorizer.db --admin-secret <secret>`
>
> ```bash
> ./authorizer \
> --database-type sqlite --database-url authorizer.db \
> --url http://localhost:8080 \
> --jwt-type HS256 --jwt-secret <jwt-secret> \
> --encryption-key "$(openssl rand -hex 32)" \
> --client-id <client-id> --client-secret <client-secret> \
> --admin-secret <admin-secret>
> ```
>
> All of the above are required as of 2.4.0 — the server exits at boot if any
> is missing. `--url` is this server's own address (not the apps allowed to
> call it, which is `--allowed-origins`).

## Local Setup

Expand Down