Skip to content

Commit 758f53b

Browse files
authored
Merge pull request #5 from fells-code/dev
0.1.0
2 parents f2cbd1d + 9583379 commit 758f53b

60 files changed

Lines changed: 13055 additions & 1351 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/release.yml

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
name: CI & Release
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- dev
8+
- main
9+
tags:
10+
- "core-v*"
11+
- "express-v*"
12+
13+
jobs:
14+
test:
15+
name: Run Tests
16+
runs-on: ubuntu-latest
17+
if: github.event_name == 'pull_request'
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- uses: actions/setup-node@v4
22+
with:
23+
node-version: 20
24+
25+
- name: Install express dependencies
26+
working-directory: packages/express
27+
run: npm install
28+
29+
- name: Install core dependencies
30+
working-directory: packages/core
31+
run: npm install
32+
33+
- name: Test Core
34+
working-directory: packages/core
35+
run: npm test
36+
37+
- name: Test Express
38+
working-directory: packages/express
39+
run: npm test
40+
41+
publish-express-beta:
42+
name: Publish Express Beta
43+
runs-on: ubuntu-latest
44+
if: github.ref == 'refs/heads/dev'
45+
permissions:
46+
contents: write
47+
id-token: write
48+
steps:
49+
- uses: actions/checkout@v4
50+
51+
- uses: actions/setup-node@v4
52+
with:
53+
node-version: 20
54+
registry-url: https://registry.npmjs.org/
55+
56+
- name: Install dependencies
57+
working-directory: packages/express
58+
run: npm ci
59+
60+
- name: Build
61+
working-directory: packages/express
62+
run: npm run build
63+
64+
- name: Bump beta version
65+
working-directory: packages/express
66+
run: |
67+
git config user.name "github-actions[bot]"
68+
git config user.email "github-actions[bot]@users.noreply.github.com"
69+
npm version prerelease --preid=beta
70+
git push --follow-tags origin dev
71+
72+
- name: Publish beta
73+
working-directory: packages/express
74+
run: npm publish --tag beta --access public
75+
env:
76+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
77+
78+
publish-core-beta:
79+
name: Publish Core Beta
80+
runs-on: ubuntu-latest
81+
if: github.ref == 'refs/heads/dev'
82+
permissions:
83+
contents: write
84+
id-token: write
85+
steps:
86+
- uses: actions/checkout@v4
87+
88+
- uses: actions/setup-node@v4
89+
with:
90+
node-version: 20
91+
registry-url: https://registry.npmjs.org/
92+
93+
- name: Install dependencies
94+
working-directory: packages/core
95+
run: npm ci
96+
97+
- name: Build
98+
working-directory: packages/core
99+
run: npm run build
100+
101+
- name: Bump beta version
102+
working-directory: packages/core
103+
run: |
104+
git config user.name "github-actions[bot]"
105+
git config user.email "github-actions[bot]@users.noreply.github.com"
106+
npm version prerelease --preid=beta
107+
git push --follow-tags origin dev
108+
109+
- name: Publish beta
110+
working-directory: packages/core
111+
run: npm publish --tag beta --access public
112+
env:
113+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
114+
publish-stable:
115+
name: Publish Stable Release
116+
runs-on: ubuntu-latest
117+
if: startsWith(github.ref, 'refs/tags/')
118+
permissions:
119+
contents: write
120+
id-token: write
121+
steps:
122+
- uses: actions/checkout@v4
123+
124+
- uses: actions/setup-node@v4
125+
with:
126+
node-version: 20
127+
registry-url: https://registry.npmjs.org/
128+
129+
- name: Determine package
130+
id: pkg
131+
run: |
132+
if [[ "${GITHUB_REF}" == refs/tags/core-* ]]; then
133+
echo "package=core" >> $GITHUB_OUTPUT
134+
elif [[ "${GITHUB_REF}" == refs/tags/express-* ]]; then
135+
echo "package=express" >> $GITHUB_OUTPUT
136+
else
137+
exit 1
138+
fi
139+
140+
- name: Install dependencies
141+
working-directory: packages/${{ steps.pkg.outputs.package }}
142+
run: npm ci
143+
144+
- name: Build
145+
working-directory: packages/${{ steps.pkg.outputs.package }}
146+
run: npm run build
147+
148+
- name: Publish stable
149+
working-directory: packages/${{ steps.pkg.outputs.package }}
150+
run: npm publish --access public
151+
env:
152+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

packages/core/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules/
2+
dist/
3+
DS_Store
4+
5+
.npmrc

packages/core/CONTRIBUTING.md

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# Contributing to Seamless Auth
2+
3+
Thanks for your interest in contributing to Seamless Auth.
4+
Contributions of all kinds are welcome — bug reports, documentation improvements, tests, and code.
5+
6+
---
7+
8+
## Project Philosophy
9+
10+
Seamless Auth is built around a few core principles:
11+
12+
- **Security first** — explicit trust boundaries and auditable logic
13+
- **Framework-agnostic core** — adapters should be thin
14+
- **Minimal magic** — clear inputs and outputs
15+
- **Predictable behavior** — changes should not surprise users
16+
17+
Please keep these principles in mind when contributing.
18+
19+
---
20+
21+
## Ways to Contribute
22+
23+
You can help by:
24+
25+
- Reporting bugs
26+
- Improving documentation
27+
- Adding tests
28+
- Refactoring for clarity
29+
- Building new adapters (Fastify, Next.js, etc.)
30+
31+
If you’re unsure where to start, open a discussion or issue.
32+
33+
---
34+
35+
## Development Setup
36+
37+
Clone the repository:
38+
39+
git clone https://github.com/fells-code/seamless-auth-server.git
40+
cd seamless-auth-server
41+
42+
Install dependencies:
43+
44+
npm install
45+
46+
Build packages:
47+
48+
npm run build
49+
50+
Run tests:
51+
52+
npm test
53+
54+
Some packages may require additional environment variables. Refer to their individual README files for details.
55+
56+
---
57+
58+
## Code Style
59+
60+
- TypeScript is used throughout
61+
- ESM modules (`"type": "module"`)
62+
- Prefer explicit types over `any`
63+
- Avoid hidden side effects and implicit globals
64+
- Keep adapters thin; put logic in `@seamless-auth/core`
65+
66+
Formatting and linting tools are provided — please run them before submitting a PR.
67+
68+
---
69+
70+
## Testing Requirements
71+
72+
All changes that affect behavior should include tests.
73+
74+
Guidelines:
75+
76+
- Core logic should be tested in `@seamless-auth/core`
77+
- Adapters should use smoke or integration tests
78+
- Tests should run against compiled output where applicable
79+
80+
Pull requests with failing tests will not be merged.
81+
82+
---
83+
84+
## Commit Guidelines
85+
86+
Please use clear, descriptive commit messages.
87+
88+
Examples:
89+
90+
- feat: add role-based authorization middleware
91+
- fix: prevent refresh loop on expired cookie
92+
- docs: clarify express adapter setup
93+
- test: add coverage for ensureCookies refresh path
94+
95+
---
96+
97+
## Submitting a Pull Request
98+
99+
1. Fork the repository
100+
2. Create a feature branch
101+
3. Make your changes
102+
4. Add or update tests as needed
103+
5. Ensure all checks pass
104+
6. Open a pull request with a clear description
105+
106+
Large or breaking changes should be discussed before implementation.
107+
108+
---
109+
110+
## Security Issues
111+
112+
If you discover a security vulnerability, **do not** open a public issue.
113+
114+
Instead, see `SECURITY.md` for responsible disclosure instructions.
115+
116+
---
117+
118+
## License
119+
120+
By contributing, you agree that your contributions will be licensed under the same license as the project (AGPL-3.0-only unless otherwise stated).
121+
122+
---
123+
124+
Thank you for helping improve Seamless Auth.
125+
126+
— Fells Code, LLC
127+
https://seamlessauth.com

packages/core/LICENSE

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
GNU AFFERO GENERAL PUBLIC LICENSE
2+
Version 3, 19 November 2007
3+
4+
Copyright (C) 2007 Free Software Foundation, Inc.
5+
<https://fsf.org/>
6+
Everyone is permitted to copy and distribute verbatim copies
7+
of this license document, but changing it is not allowed.
8+
9+
This license is identical to the GNU General Public License, except that it also
10+
ensures that software running as a network service makes its source code
11+
available to users.
12+
13+
---
14+
15+
TERMS AND CONDITIONS
16+
17+
0. Definitions.
18+
19+
“This License” refers to version 3 of the GNU Affero General Public License.
20+
21+
“Copyright” also means copyright-like laws that apply to other kinds of works,
22+
such as semiconductor masks.
23+
24+
The “Program” refers to any copyrightable work licensed under this License.
25+
Each licensee is addressed as “you”.
26+
27+
To “modify” a work means to copy from or adapt all or part of the work in a
28+
fashion requiring copyright permission, other than the making of an exact copy.
29+
30+
To “propagate” a work means to do anything with it that, without permission,
31+
would make you directly or secondarily liable for infringement under applicable
32+
copyright law, except executing it on a computer or modifying a private copy.
33+
34+
To “convey” a work means any kind of propagation that enables other parties to
35+
make or receive copies.
36+
37+
An interactive user interface displays “Appropriate Legal Notices” to the extent
38+
that it includes a convenient and prominently visible feature that displays an
39+
appropriate copyright notice, and tells the user that there is no warranty for
40+
the work (except to the extent that warranties are provided), that licensees may
41+
convey the work under this License, and how to view a copy of this License.
42+
43+
---
44+
45+
13. Remote Network Interaction; Use with the GNU General Public License.
46+
47+
Notwithstanding any other provision of this License, if you modify the Program,
48+
your modified version must prominently offer all users interacting with it
49+
remotely through a computer network an opportunity to receive the Corresponding
50+
Source of your version by providing access to the Corresponding Source from a
51+
network server at no charge, through some standard or customary means of
52+
facilitating copying of software.
53+
54+
---
55+
56+
15. Disclaimer of Warranty.
57+
58+
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
59+
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER
60+
PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER
61+
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
62+
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
63+
64+
---
65+
66+
16. Limitation of Liability.
67+
68+
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY
69+
COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS
70+
PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL,
71+
INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
72+
THE PROGRAM.
73+
74+
---
75+
76+
END OF TERMS AND CONDITIONS
77+
78+
You should have received a copy of the GNU Affero General Public License along
79+
with this program. If not, see <https://www.gnu.org/licenses/>.

packages/core/LICENSE.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# License
2+
3+
Seamless Auth Server - Core ("@seamless-auth/core") is licensed under the **GNU Affero General Public License v3.0 (AGPL-3.0-only)**.
4+
5+
- SPDX: `AGPL-3.0-only`
6+
7+
## What this means (high level)
8+
9+
- You are free to **use**, **modify**, and **self-host** this software.
10+
- If you **modify** this software and **run it as a network service** (for example, hosting it for others to use), you must **make the complete corresponding source code of your modified version available** to users of that service, under the AGPL.
11+
12+
This summary is not legal advice and does not replace the license text.
13+
14+
## Full license text
15+
16+
The full license text is available here:
17+
18+
- https://www.gnu.org/licenses/agpl-3.0.html
19+
20+
You should include a copy of the AGPLv3 license in your distribution. If this repository does not contain the full license text yet, add it as `LICENSE` or `LICENSE.txt` (recommended), and keep this `LICENSE.md` as the human-friendly summary.
21+
22+
## Commercial licensing
23+
24+
If you would like to embed Seamless Auth API into a proprietary product, redistribute it under different terms, or offer it as a managed service without AGPL obligations, commercial licensing may be available.
25+
26+
Contact: support@seamlessauth.com

0 commit comments

Comments
 (0)