Commit Graph

2145 Commits

Author SHA1 Message Date
Zai Shi
95db583f97 8120 -> 8121 2025-08-01 10:26:32 -07:00
Zai Shi
c48027166f fix import 2025-08-01 10:01:23 -07:00
Zai Shi
c324aa2f4e remove unused 2025-08-01 09:50:37 -07:00
Zai Shi
f103ce8a29 Merge branch 's3' of github.com:stackframe-projects/stack into s3 2025-08-01 09:50:03 -07:00
Zai Shi
a6c69bbbaf
Merge branch 'dev' into s3 2025-08-01 18:49:55 +02:00
Zai Shi
a205566083 removed unused 2025-08-01 09:49:52 -07:00
Zai Shi
52cfaf8c83 fix 2025-08-01 09:42:44 -07:00
Zai Shi
31d8c37a4e Merge branch 'project-config-to-json' into s3 2025-08-01 09:29:29 -07:00
Zai Shi
2b5eebcd22
Config override CRUD (#803)
<!--

Make sure you've read the CONTRIBUTING.md guidelines:
https://github.com/stack-auth/stack-auth/blob/dev/CONTRIBUTING.md

-->

<!-- ELLIPSIS_HIDDEN -->


----

> [!IMPORTANT]
> Add admin-only API endpoints and UI support for project configuration
overrides, with comprehensive tests and documentation updates.
> 
>   - **New Features**:
> - Added admin-only API endpoints for reading and updating project
configuration overrides in `config/crud.tsx` and
`config/override/crud.tsx`.
> - Admin app supports fetching, caching, and updating configuration
overrides with new React hooks in `admin-app-impl.ts`.
>   - **Bug Fixes**:
> - Validation and error handling for OAuth providers, duplicate IDs,
and invalid config fields in `oauth-providers/crud.tsx`.
>   - **Tests**:
> - Added end-to-end tests for configuration management and validation
errors in `config.test.ts` and `js/config.test.ts`.
>   - **Documentation**:
> - Updated API documentation for new config override endpoints in
`config.ts`.
> 
> <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 3d20abc092. You can
[customize](https://app.ellipsis.dev/stack-auth/settings/summaries) this
summary. It will automatically update as commits are pushed.</sup>

----


<!-- ELLIPSIS_HIDDEN -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* Added the ability for admins to view and update project configuration
overrides through new internal API endpoints.
* Extended the admin app to support fetching, updating, and caching
configuration overrides, including React hook support for real-time
config usage.
* Introduced new admin interface methods for retrieving and updating
configuration.

* **Bug Fixes**
* Improved validation and error handling for configuration updates,
including checks for duplicate or invalid OAuth provider entries and
non-existent configuration fields.

* **Tests**
* Added comprehensive end-to-end tests covering configuration retrieval,
updates, access control, OAuth provider management, and domain
management.

* **Documentation**
* Enhanced API documentation for configuration management endpoints and
operations.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Konsti Wohlwend <n2d4xc@gmail.com>
2025-08-01 18:28:27 +02:00
Zai Shi
3d20abc092 rename endpoints 2025-08-01 09:15:24 -07:00
Zai Shi
dee426f9fc remove word 2025-07-31 16:33:15 -07:00
Zai Shi
8e581f69ec remove logging 2025-07-31 16:31:33 -07:00
Zai Shi
eb5a1731a3
Merge branch 'dev' into project-config-to-json 2025-08-01 01:24:20 +02:00
Konstantin Wohlwend
5f4d35e083 Add tracing to ESBuild 2025-07-31 16:22:55 -07:00
Zai Shi
48bb8757d8 add tests 2025-07-31 16:22:14 -07:00
Zai Shi
db50e41726 fix 2025-07-31 16:18:17 -07:00
Zai Shi
44eecf6bbc
Merge branch 'dev' into project-config-to-json 2025-08-01 01:05:11 +02:00
Zai Shi
677de8aa73 fix 2025-07-31 16:04:41 -07:00
Konstantin Wohlwend
f5bf1f3dee Increase version alerter zIndex
Some checks failed
all-good: Did all the other checks pass? / all-good (push) Has been cancelled
Ensure Prisma migrations are in sync with the schema / check_prisma_migrations (22.x) (push) Has been cancelled
Docker Emulator Test / docker (push) Has been cancelled
Docker Server Build and Push / Docker Build and Push Server (push) Has been cancelled
Docker Server Test / docker (push) Has been cancelled
Runs E2E API Tests / build (22.x) (push) Has been cancelled
Runs E2E API Tests with external source of truth / build (22.x) (push) Has been cancelled
Lint & build / lint_and_build (latest) (push) Has been cancelled
Mirror main branch to main-mirror-for-wdb / lint_and_build (push) Has been cancelled
Dev Environment Test / restart-dev-and-test (push) Has been cancelled
Run setup tests / setup-tests (push) Has been cancelled
TOC Generator / TOC Generator (push) Has been cancelled
2025-07-31 16:00:26 -07:00
Zai Shi
1d5291007e fix 2025-07-31 15:59:05 -07:00
Konstantin Wohlwend
c09a17b9e0 Fix project cards when there are many projects 2025-07-31 15:58:50 -07:00
Zai Shi
5d451709b6
Merge branch 'dev' into project-config-to-json 2025-08-01 00:56:34 +02:00
Zai Shi
b3b581c56f fix tests 2025-07-31 15:54:35 -07:00
Konstantin Wohlwend
7c14504098 Do-not-delete warning on external projects 2025-07-31 15:50:57 -07:00
Konstantin Wohlwend
9399b84f97 Use retryTransaction instead of $transaction 2025-07-31 15:43:48 -07:00
Zai Shi
ee330cb919 Refactor config CRUD handlers to standardize naming conventions for config strings and enhance validation in update operations. 2025-07-31 15:40:34 -07:00
Konstantin Wohlwend
7fe0dbf742 Fix tests 2025-07-31 15:25:26 -07:00
Zai Shi
7862a3ef65 Refactor config overrides CRUD handlers by simplifying paramsSchema and removing unused exports in route.tsx 2025-07-31 15:09:08 -07:00
Zai Shi
40db4e2ff0 Merge branch 'project-config-to-json' of github.com:stackframe-projects/stack into project-config-to-json 2025-07-31 15:01:44 -07:00
Zai Shi
c76d55fafc fix 2025-07-31 15:01:42 -07:00
Shridhar Deshmukh
8f55c1e710
fix: update super-admin-key name for neon auth (#809)
Deleting super-secrete-admin-key breaks the integration with Neon Auth.
This Pull request adds warning to key name to not delete it.
2025-07-31 13:15:57 -07:00
Zai Shi
9e5a049f25
Update apps/e2e/tests/backend/endpoints/api/v1/internal/config-overrides.test.ts
Co-authored-by: Konsti Wohlwend <n2d4xc@gmail.com>
2025-07-31 22:00:31 +02:00
Zai Shi
5a05e017d7 fix 2025-07-31 12:35:39 -07:00
Zai Shi
60ced05237 Merge branch 'dev' into project-config-to-json 2025-07-31 11:45:36 -07:00
Zai Shi
40a6c7a7dc Merge branch 'remove-old-config' into project-config-to-json 2025-07-31 11:44:07 -07:00
Konstantin Wohlwend
a846432c61 Fix globe blur 2025-07-31 11:42:50 -07:00
Zai Shi
7226c40d0a
Remove legacy tenancy config (#802)
<!--

Make sure you've read the CONTRIBUTING.md guidelines:
https://github.com/stack-auth/stack-auth/blob/dev/CONTRIBUTING.md

-->

<!-- ELLIPSIS_HIDDEN -->


----

> [!IMPORTANT]
> Refactor tenancy configuration structure, affecting authentication,
email, domain, OAuth, and permissions settings, with updates to feature
flag checks, property access, and test assertions.
> 
>   - **Refactor**:
> - Updated configuration structure for authentication, email, domain,
OAuth, and permissions settings, affecting feature flag checks and
property access in `handlers.tsx`, `route.tsx`, and `crud.tsx`.
> - Improved handling of domain and OAuth provider configurations for
integrations and CRUD operations.
> - Adjusted redirect URL validation and origin checks to use updated
tenancy configuration.
> - Transformed project and tenancy configuration data returned by API
handlers for consistency.
> - Centralized email theme and template retrieval from updated
configuration paths.
>   - **Bug Fixes**:
> - Corrected error messages related to OTP sign-in feature
availability.
>   - **Tests**:
> - Updated test assertions to match new error messages for OTP sign-in.
>   - **Chores**:
> - Reorganized import statements and updated internal logic to align
with new configuration structure.
> 
> <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 ae04ae28be. You can
[customize](https://app.ellipsis.dev/stack-auth/settings/summaries) this
summary. It will automatically update as commits are pushed.</sup>

----


<!-- ELLIPSIS_HIDDEN -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Refactor**
* Updated configuration structure for authentication, email, domain,
OAuth, and permissions settings, resulting in changes to feature flag
checks and property access throughout the backend.
* Improved handling of domain and OAuth provider configurations for
integrations and CRUD operations.
* Adjusted redirect URL validation and origin checks to use updated
tenancy configuration.
* Transformed project and tenancy configuration data returned by API
handlers for consistency.
* Centralized email theme and template retrieval from updated
configuration paths.
* Simplified redirect URL validation calls by passing tenancy objects
directly.
* Updated passkey, password, OTP, and OAuth feature flag checks to new
nested configuration properties.

* **Bug Fixes**
* Corrected error messages related to OTP sign-in feature availability.

* **Tests**
  * Updated test assertions to match new error messages for OTP sign-in.

* **Chores**
* Reorganized import statements and updated internal logic to align with
new configuration structure.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2025-07-31 20:06:33 +02:00
Zai Shi
ae04ae28be fix tests 2025-07-31 10:51:55 -07:00
Zai Shi
577eaf368e fix tests 2025-07-31 10:51:18 -07:00
Zai Shi
9fa42c703a Improve error handling for missing provider type in OAuth configuration 2025-07-31 09:52:45 -07:00
Zai Shi
079df58c1a fix types 2025-07-31 09:46:47 -07:00
Zai Shi
1904feb048
Merge branch 'dev' into remove-old-config 2025-07-31 18:39:32 +02:00
Zai Shi
405a63f795 Merge branch 'dev' into remove-old-config 2025-07-31 09:39:21 -07:00
Zai Shi
7f78755a53 fix types 2025-07-30 17:03:18 -07:00
Zai Shi
d2413f3de1 fix types 2025-07-30 17:02:57 -07:00
Zai Shi
617295265b fix 2025-07-30 16:45:59 -07:00
Zai Shi
4ed5fe95e5
Merge branch 'config-json-crud' into s3 2025-07-31 00:59:53 +02:00
Zai Shi
6d83076d9c fix types 2025-07-30 14:59:09 -07:00
Zai Shi
af5fbd0156 fix syntax error 2025-07-30 14:55:00 -07:00
Zai Shi
3369c3ac78 fix import 2025-07-30 14:51:27 -07:00