mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
<!--
Make sure you've read the CONTRIBUTING.md guidelines:
https://github.com/stack-auth/stack-auth/blob/dev/CONTRIBUTING.md
-->
<img width="1510" alt="image"
src="https://github.com/user-attachments/assets/99619123-6be5-4788-aebe-5fc2a9a36245"
/>
<img width="1510" alt="image"
src="https://github.com/user-attachments/assets/660677bf-f19a-4673-94c8-59ac50eb6ae5"
/>
<img width="1510" alt="image"
src="https://github.com/user-attachments/assets/11ae63c4-5813-4fd8-aa01-fa580d2103be"
/>
<!-- ELLIPSIS_HIDDEN -->
----
> [!IMPORTANT]
> Introduces API key management for users and teams, integrating with
existing project configurations and permissions, and adds comprehensive
tests and examples.
>
> - **API Key Management**:
> - Introduces `ProjectApiKey` model in `schema.prisma` for managing API
keys.
> - Adds `createApiKeyHandlers` in `handlers.tsx` to handle API key CRUD
operations.
> - Implements API key creation, revocation, and validation logic.
> - **Permissions and Configurations**:
> - Adds `allowUserApiKeys` and `allowTeamApiKeys` to `ProjectConfig` in
`schema.prisma`.
> - Updates `TeamSystemPermission` enum to include `MANAGE_API_KEYS`.
> - Ensures API key operations respect project configurations and
user/team permissions.
> - **Testing and Examples**:
> - Adds extensive tests in `api-keys.test.ts` to cover various API key
scenarios.
> - Updates example projects to demonstrate API key usage.
> - **Miscellaneous**:
> - Refactors existing code to integrate API key functionalities.
> - Updates documentation and type definitions to reflect new API key
features.
>
> <sup>This description was created by </sup>[<img alt="Ellipsis"
src="https://img.shields.io/badge/Ellipsis-blue?color=175173">](https://www.ellipsis.dev?ref=stack-auth%2Fstack-auth&utm_source=github&utm_medium=referral)<sup>
for 96f60c57f0. It will automatically
update as commits are pushed.</sup>
<!-- ELLIPSIS_HIDDEN -->
---------
Co-authored-by: Konsti Wohlwend <n2d4xc@gmail.com>
76 lines
1.7 KiB
JSON
76 lines
1.7 KiB
JSON
{
|
|
"name": "@stackframe/stack-shared",
|
|
"version": "2.8.2",
|
|
"main": "./dist/index.js",
|
|
"types": "./dist/index.d.ts",
|
|
"type": "module",
|
|
"scripts": {
|
|
"build": "tsc",
|
|
"typecheck": "tsc --noEmit",
|
|
"test": "vitest run",
|
|
"clean": "rimraf dist && rimraf node_modules",
|
|
"dev": "tsc -w --preserveWatchOutput --declarationMap",
|
|
"lint": "eslint --ext .tsx,.ts ."
|
|
},
|
|
"files": [
|
|
"README.md",
|
|
"dist",
|
|
"CHANGELOG.md",
|
|
"LICENSE"
|
|
],
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/index.d.ts",
|
|
"default": "./dist/index.js"
|
|
},
|
|
"./dist/*": {
|
|
"types": "./dist/*.d.ts",
|
|
"default": "./dist/*.js"
|
|
}
|
|
},
|
|
"peerDependencies": {
|
|
"@types/react": ">=18.2 || >=19.0.0-rc.0",
|
|
"@types/react-dom": ">=18.2 || >=19.0.0-rc.0",
|
|
"react": ">=18.2 || >=19.0.0-rc.0",
|
|
"react-dom": ">=18.2 || >=19.0.0-rc.0",
|
|
"yup": "^1.4.0"
|
|
},
|
|
"peerDependenciesMeta": {
|
|
"react": {
|
|
"optional": true
|
|
},
|
|
"@types/react": {
|
|
"optional": true
|
|
},
|
|
"@types/react-dom": {
|
|
"optional": true
|
|
},
|
|
"yup": {
|
|
"optional": true
|
|
}
|
|
},
|
|
"dependencies": {
|
|
"@simplewebauthn/browser": "^11.0.0",
|
|
"async-mutex": "^0.5.0",
|
|
"bcrypt": "^5.1.1",
|
|
"crc": "^4.3.2",
|
|
"elliptic": "^6.5.7",
|
|
"ip-regex": "^5.0.0",
|
|
"jose": "^5.2.2",
|
|
"oauth4webapi": "^2.10.3",
|
|
"semver": "^7.6.3",
|
|
"uuid": "^9.0.1"
|
|
},
|
|
"devDependencies": {
|
|
"@sentry/nextjs": "^8.40.0",
|
|
"@simplewebauthn/types": "^11.0.0",
|
|
"@types/bcrypt": "^5.0.2",
|
|
"@types/elliptic": "^6.4.18",
|
|
"@types/semver": "^7.5.8",
|
|
"@types/uuid": "^9.0.8",
|
|
"react": "^18.2",
|
|
"react-dom": "^18.2",
|
|
"rimraf": "^5.0.5"
|
|
}
|
|
}
|