Commit Graph

31 Commits

Author SHA1 Message Date
dswbx
e939debba5 auth: add delete auth after flash in case only one is picked up 2025-07-05 09:43:14 +02:00
dswbx
70737c04cd refactor console imports, added config update event 2025-07-02 14:02:50 +02:00
dswbx
a5b59c004e fix logout by setting the api route as logout target 2025-06-07 08:48:28 +02:00
dswbx
372f94d22a Release 0.12 (#143)
* changed tb imports

* cleanup: replace console.log/warn with $console, remove commented-out code

Removed various commented-out code and replaced direct `console.log` and `console.warn` usage across the codebase with `$console` from "core" for standardized logging. Also adjusted linting rules in biome.json to enable warnings for `console.log` usage.

* ts: enable incremental

* fix imports in test files

reorganize imports to use "@sinclair/typebox" directly, replacing local utility references, and add missing "override" keywords in test classes.

* added media permissions (#142)

* added permissions support for media module

introduced `MediaPermissions` for fine-grained access control in the media module, updated routes to enforce these permissions, and adjusted permission registration logic.

* fix: handle token absence in getUploadHeaders and add tests for transport modes

ensure getUploadHeaders does not set Authorization header when token is missing. Add unit tests to validate behavior for different token_transport options.

* remove console.log on DropzoneContainer.tsx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* add bcrypt and refactored auth resolve (#147)

* reworked auth architecture with improved password handling and claims

Refactored password strategy to prepare supporting bcrypt, improving hashing/encryption flexibility. Updated authentication flow with enhanced user resolution mechanisms, safe JWT generation, and consistent profile handling. Adjusted dependencies to include bcryptjs and updated lock files accordingly.

* fix strategy forms handling, add register route and hidden fields

Refactored strategy forms to include hidden fields for type and name. Added a registration route with necessary adjustments to the admin controller and routes. Corrected field handling within relevant forms and components.

* refactored auth handling to support bcrypt, extracted user pool

* update email regex to allow '+' and '_' characters

* update test stub password for AppAuth spec

* update data exceptions to use HttpStatus constants, adjust logging level in AppUserPool

* rework strategies to extend a base class instead of interface

* added simple bcrypt test

* add validation logs and improve data validation handling (#157)

Added warning logs for invalid data during mutator validation, refined field validation logic to handle undefined values, and adjusted event validation comments for clarity. Minor improvements include exporting events from core and handling optional chaining in entity field validation.

* modify MediaApi to support custom fetch implementation, defaults to native fetch (#158)

* modify MediaApi to support custom fetch implementation, defaults to native fetch

added an optional `fetcher` parameter to allow usage of a custom fetch function in both `upload` and `fetcher` methods. Defaults to the standard `fetch` if none is provided.

* fix tests and improve api fetcher types

* update admin basepath handling and window context integration (#155)

Refactored `useBkndWindowContext` to include `admin_basepath` and updated its usage in routing. Improved type consistency with `AdminBkndWindowContext` and ensured default values are applied for window context.

* trigger `repository-find-[one|many]-[before|after]` based on `limit` (#160)

* refactor error handling in authenticator and password strategy (#161)

made `respondWithError` method public, updated login and register routes in `PasswordStrategy` to handle errors using `respondWithError` for consistency.

* add disableSubmitOnError prop to NativeForm and export getFlashMessage (#162)

Introduced a `disableSubmitOnError` prop to NativeForm to control submit button behavior when errors are present. Also exported `getFlashMessage` from the core for external usage.

* update dependencies in package.json (#156)

moved several dependencies between devDependencies and dependencies for better categorization and removed redundant entries.

* update imports to adjust nodeTestRunner path and remove unused export (#163)

updated imports in test files to reflect the correct path for nodeTestRunner. removed redundant export of nodeTestRunner from index file to clean up module structure. In some environments this could cause issues requiring to exclude `node:test`, just removing it for now.

* fix sync events not awaited (#164)

* refactor(dropzone): extract DropzoneInner and unify state management with zustand (#165)

Simplified Dropzone implementation by extracting inner logic to a new component, `DropzoneInner`. Replaced local dropzone state logic with centralized state management using zustand. Adjusted API exports and props accordingly for consistency and maintainability.

* replace LiquidJs rendering with simplified renderer (#167)

* replace LiquidJs rendering with simplified renderer

Removed dependency on LiquidJS and replaced it with a custom templating solution using lodash `get`. Updated corresponding components, editors, and tests to align with the new rendering approach. Removed unused filters and tags.

* remove liquid js from package json

* feat/cli-generate-types (#166)

* init types generation

* update type generation for entities and fields

Refactored `EntityTypescript` to support improved field types and relations. Added `toType` method overrides for various fields to define accurate TypeScript types. Enhanced CLI `types` command with new options for output style and file handling. Removed redundant test files.

* update type generation code and CLI option description

removed unused imports definition, adjusted formatting in EntityTypescript, and clarified the CLI style option description.

* fix json schema field type generation

* reworked system entities to prevent recursive types

* reworked system entities to prevent recursive types

* remove unused object function

* types: use number instead of Generated

* update data hooks and api types

* update data hooks and api types

* update data hooks and api types

* update data hooks and api types

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-01 10:12:18 +02:00
dswbx
ca86fa58ac cli: user: add token generation (#140)
* cli: user: add token generation

* cli: user: add token generation

* cli: user: check for value being cancel before continuing
2025-04-05 17:57:03 +02:00
dswbx
7743f71a11 added format command and added trailing commas to reduce conflicts 2025-02-26 20:06:03 +01:00
dswbx
88b5359f1c Merge pull request #99 from bknd-io/feat/data-api-bulk-update
feat/data-api-bulk-update
2025-02-26 19:55:22 +01:00
dswbx
4a2dbf8f79 added bulk updates to data controller 2025-02-26 18:04:07 +01:00
dswbx
2a9c1be151 added auth strategies form + add ability to disable strategies 2025-02-26 14:53:32 +01:00
dswbx
21a8f56c48 moved auth ctx to request context, cleaned up system controller 2025-02-14 20:32:09 +01:00
dswbx
45d44f8177 Merge remote-tracking branch 'origin/release/0.7' into fix/auth-api-include-cookie
# Conflicts:
#	app/src/auth/authenticate/Authenticator.ts
2025-02-01 09:15:01 +01:00
dswbx
db476080ad also sending cookies on json auth requests 2025-02-01 09:13:42 +01:00
dswbx
4755288fed improve fallbacks for redirection 2025-01-29 20:30:27 +01:00
dswbx
10db267164 added a redirect param to password strategy 2025-01-29 20:26:06 +01:00
dswbx
39c419c320 add built state and skip auth cookie if not signed in for local calls 2025-01-25 19:30:03 +01:00
dswbx
b61634e261 introduced auth strategy actions to allow user creation in UI 2025-01-17 10:19:26 +01:00
dswbx
b1a32f3705 added nextjs detection and added exception for auth redirection to also work inside stackblitz 2025-01-11 16:23:20 +01:00
dswbx
bd4bc14282 reworked authentication and permission handling 2025-01-11 15:27:58 +01:00
dswbx
c732566f63 Add integration tests for auth, improve auth middleware and cookies handling 2025-01-11 10:52:31 +01:00
dswbx
47f48be514 Refactor module middleware initialization logic.
Replaced `getMiddleware` with `onServerInit` for streamlined middleware registration. Updated `AppAuth` to automatically register its authentication middleware. Added a test case to verify middleware registration. Removed redundant cookie renewal logic from `AdminController` and made related adjustments across modules.
2025-01-09 10:59:48 +01:00
dswbx
b7ec4982dc cli: automatically register local adapter 2024-12-10 15:50:41 +01:00
dswbx
d6978f9873 fix auth tests 2024-12-03 09:16:00 +01:00
dswbx
feeb13c053 improved astro adapter (serving api) + added documentation 2024-12-01 08:58:08 +01:00
dswbx
509d6826f0 hotfix: cookies may not be added to static assets 2024-11-28 18:07:29 +01:00
dswbx
d36c4b07e0 verified cloudflare workers + added configs where to navigate after login/logout 2024-11-26 13:26:11 +01:00
dswbx
9d896a6ab1 improved nextjs/remix adapters and docs, confirmed remix ssr working 2024-11-26 11:15:38 +01:00
dswbx
1c94777317 switched to hono/jwt to save some kb 2024-11-25 17:54:26 +01:00
dswbx
16a6a3315d added cookie to config + fixed config set endpoint 2024-11-25 16:57:12 +01:00
dswbx
824ff40133 reworked admin auth to use form and cookie + adjusted oauth to support API and cookie-based auth 2024-11-23 18:12:19 +01:00
dswbx
6077f0e64f added onBeforeUpdate listener + auto create a secret on auth enable 2024-11-21 16:24:33 +01:00
dswbx
90f80c4280 public commit 2024-11-16 12:01:47 +01:00