@tinyrack/issuary-server 0.20.0 → 0.21.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/LICENSE +21 -0
  2. package/dist/repositories/oauth-code.repository.d.ts +2 -2
  3. package/dist/repositories/oauth-code.repository.d.ts.map +1 -1
  4. package/dist/repositories/oauth-code.repository.js +7 -3
  5. package/dist/repositories/oauth-code.repository.js.map +1 -1
  6. package/dist/repositories/oauth-device-code.repository.d.ts +4 -4
  7. package/dist/repositories/oauth-device-code.repository.d.ts.map +1 -1
  8. package/dist/repositories/oauth-device-code.repository.js +18 -6
  9. package/dist/repositories/oauth-device-code.repository.js.map +1 -1
  10. package/dist/repositories/user-totp-recovery-code.repository.d.ts +1 -1
  11. package/dist/repositories/user-totp-recovery-code.repository.d.ts.map +1 -1
  12. package/dist/repositories/user-totp-recovery-code.repository.js +2 -1
  13. package/dist/repositories/user-totp-recovery-code.repository.js.map +1 -1
  14. package/dist/routes/oauth/device/get-post.js +5 -5
  15. package/dist/routes/oauth/device/get-post.js.map +1 -1
  16. package/dist/seeders/config.seeder.js +1 -1
  17. package/dist/services/container.d.ts.map +1 -1
  18. package/dist/services/container.js +41 -0
  19. package/dist/services/container.js.map +1 -1
  20. package/dist/services/oauth-client.service.d.ts +1 -0
  21. package/dist/services/oauth-client.service.d.ts.map +1 -1
  22. package/dist/services/oauth-client.service.js +17 -2
  23. package/dist/services/oauth-client.service.js.map +1 -1
  24. package/dist/services/oauth-token.service.d.ts.map +1 -1
  25. package/dist/services/oauth-token.service.js +4 -4
  26. package/dist/services/oauth-token.service.js.map +1 -1
  27. package/dist/services/password-auth.service.d.ts.map +1 -1
  28. package/dist/services/password-auth.service.js +10 -2
  29. package/dist/services/password-auth.service.js.map +1 -1
  30. package/dist/services/security.service.d.ts +8 -0
  31. package/dist/services/security.service.d.ts.map +1 -1
  32. package/dist/services/security.service.js +85 -22
  33. package/dist/services/security.service.js.map +1 -1
  34. package/dist/services/totp.service.js +2 -2
  35. package/dist/services/totp.service.js.map +1 -1
  36. package/package.json +51 -148
  37. package/readme.md +106 -0
package/readme.md ADDED
@@ -0,0 +1,106 @@
1
+ <div align="center">
2
+
3
+ # Issuary
4
+
5
+ **A lightweight, self-hosted OpenID Connect provider for modern applications.**
6
+
7
+ [![CI](https://github.com/tinyrack-net/issuary/actions/workflows/ci.yml/badge.svg)](https://github.com/tinyrack-net/issuary/actions/workflows/ci.yml)
8
+ [![npm server](https://img.shields.io/npm/v/@tinyrack/issuary-server?label=server)](https://www.npmjs.com/package/@tinyrack/issuary-server)
9
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
10
+ [![Node.js](https://img.shields.io/badge/node-%3E%3D24-brightgreen)](https://nodejs.org/)
11
+
12
+ [Documentation](https://issuary.tinyrack.net/en/) · [Configuration](https://issuary.tinyrack.net/en/configuration/overview/) · [한국어](https://issuary.tinyrack.net/ko/)
13
+
14
+ </div>
15
+
16
+ ---
17
+
18
+ Issuary is a self-hosted OpenID Connect (OIDC) provider that gives your apps a standards-based login system without bringing in a full identity platform.
19
+
20
+ It supports OAuth2/OIDC authorization code flows, PKCE, password login, passkeys, TOTP, social login, and a customizable multilingual frontend. Run it as a standalone server, ship it with Docker, or embed the server package in your own Node.js application.
21
+
22
+ ## Features
23
+
24
+ - **OIDC/OAuth2 provider** with authorization code flow, PKCE, discovery, token, userinfo, introspection, revocation, RP-initiated logout, client credentials, and device authorization endpoints
25
+ - **Multiple sign-in methods** including password, passkeys/WebAuthn, GitHub, Google, Apple, and generic OAuth/OIDC providers
26
+ - **Two-factor authentication** with TOTP and passkey-based second factors
27
+ - **Config-driven deployment** through a single YAML file
28
+ - **Customizable frontend** with themes, branding, background images, language selection, and terms flows
29
+ - **Database support** for SQLite and PostgreSQL
30
+ - **Standalone or embedded usage** through Docker or `@tinyrack/issuary-server`
31
+
32
+ ## Installation
33
+
34
+ ### Docker
35
+
36
+ ```bash
37
+ docker run --rm \
38
+ -p 8080:8080 \
39
+ -v ./config.yaml:/opt/config.yaml \
40
+ ghcr.io/tinyrack-net/issuary:latest
41
+ ```
42
+
43
+ ### Server package
44
+
45
+ Use the server package when you want to embed Issuary in your own Node.js runtime.
46
+
47
+ ```bash
48
+ npm install @tinyrack/issuary-server
49
+ ```
50
+
51
+ ## Quick Start
52
+
53
+ Create a minimal `config.yaml`:
54
+
55
+ ```yaml
56
+ app:
57
+ host: http://localhost:8080
58
+ port: 8080
59
+
60
+ security:
61
+ session_secret: change-me-session-secret
62
+ hash_secret: change-me-hash-secret
63
+
64
+ database:
65
+ type: sqlite
66
+ path: ./data.db
67
+
68
+ basic_authentication_methods:
69
+ password:
70
+ enabled: true
71
+ passkey:
72
+ enabled: true
73
+ ```
74
+
75
+ Start Issuary:
76
+
77
+ ```bash
78
+ docker run --rm \
79
+ -p 8080:8080 \
80
+ -v ./config.yaml:/opt/config.yaml \
81
+ ghcr.io/tinyrack-net/issuary:latest
82
+ ```
83
+
84
+ Verify the OIDC discovery endpoint:
85
+
86
+ ```bash
87
+ curl http://localhost:8080/.well-known/openid-configuration
88
+ ```
89
+
90
+ OAuth/OIDC error responses from OAuth endpoints include the standard `error` and `error_description` fields for client compatibility. Issuary also preserves its internal `code` and `message` fields for existing API consumers.
91
+
92
+ Issuary only advertises implemented provider capabilities in discovery metadata. Register `client_credentials` only for confidential clients with a `client_secret`, and register `urn:ietf:params:oauth:grant-type:device_code` only for clients that should use the device authorization flow.
93
+
94
+ ## Examples
95
+
96
+ - `examples/clients/nextjs-ssr` — Next.js OIDC client with server-side token handling
97
+ - `examples/clients/react-spa` — React SPA using authorization code flow with PKCE
98
+ - `examples/servers/node-hono-sqlite` — Hono + SQLite deployment using `@tinyrack/issuary-server` and the bundled frontend
99
+
100
+ ## Documentation
101
+
102
+ For configuration guides, client integration examples, deployment notes, and the API reference, visit the **[Issuary documentation site](https://issuary.tinyrack.net/en/)**.
103
+
104
+ ## License
105
+
106
+ [MIT](LICENSE)