Commit Graph

1878 Commits

Author SHA1 Message Date
7sasking
169933397c feat: add Arabic language support 2025-05-17 19:15:20 +03:00
similiarity
04b49f2d1e
Update packages, add bundle analyzer, add declarationMap (#665)
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
Lint & build / lint_and_build (latest) (push) Has been cancelled
Preview Docs / run (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
<!--

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

-->

<!-- ELLIPSIS_HIDDEN -->


----

> [!IMPORTANT]
> Update dependencies, add bundle analyzer, and enhance
`ProfileImageEditor` with `react-easy-crop`.
> 
>   - **Dependencies**:
> - Update `lucide-react` to `^0.508.0` in
`apps/dashboard/package.json`, `packages/stack-emails/package.json`, and
`packages/stack-ui/package.json`.
> - Replace `react-avatar-editor` with `react-easy-crop` in
`packages/react/package.json`, `packages/stack/package.json`, and
`packages/template/package-template.json`.
>     - Add `@next/bundle-analyzer` to `examples/demo/package.json`.
>   - **Build Configuration**:
> - Add bundle analyzer configuration to `examples/demo/next.config.js`.
>     - Add `analyze` script to `examples/demo/package.json`.
>   - **Component Changes**:
> - Replace `AvatarEditor` with `Cropper` in `ProfileImageEditor` in
`packages/template/src/components/profile-image-editor.tsx`.
> - Update `Calendar` component styles in
`packages/stack-ui/src/components/ui/calendar.tsx`.
>   - **Utility Functions**:
> - Update `isBase32`, `isBase64`, and `isBase64Url` test cases in
`bytes.tsx` to handle specific edge cases.
> 
> <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 ae4574dba0. You can
[customize](https://app.ellipsis.dev/stack-auth/settings/summaries) this
summary. It will automatically update as commits are pushed.</sup>


<!-- ELLIPSIS_HIDDEN -->

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Konsti Wohlwend <n2d4xc@gmail.com>
2025-05-16 17:07:44 -07:00
Konstantin Wohlwend
f9f7dfa4ca Remove hardcoded test cases 2025-05-16 09:29:51 -07:00
Konsti Wohlwend
dbb1b880f5
Update README.md
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
Lint & build / lint_and_build (latest) (push) Has been cancelled
Preview Docs / run (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-05-15 15:42:58 -07:00
Zai Shi
4205c1109c
Demo floating window (#678)
<!--

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

-->

<img width="474" alt="image"
src="https://github.com/user-attachments/assets/5fb5a632-d605-49ed-89d6-b26533d84a2f"
/>

<!-- ELLIPSIS_HIDDEN -->


----

> [!IMPORTANT]
> Adds `DemoFloatingWindow` component for development, integrated into
demo layout and stack initialization, providing user actions like
sign-in and account settings.
> 
>   - **Behavior**:
> - Adds `DemoFloatingWindow` component in `demo-floating-window.tsx`,
visible only in development mode.
>     - Provides user actions: sign-in, sign-out, account settings.
>   - **Integration**:
> - Integrates `DemoFloatingWindow` into `layout.tsx` within the
`StackProvider` and `StackTheme`.
> - Updates `getUpdatedLayout()` in `index.ts` to include
`DemoFloatingWindow` in the layout.
>   - **Exports**:
>     - Exports `DemoFloatingWindow` in `index.ts` for external use.
> 
> <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 98aa609882. You can
[customize](https://app.ellipsis.dev/stack-auth/settings/summaries) this
summary. It will automatically update as commits are pushed.</sup>


<!-- ELLIPSIS_HIDDEN -->

---------

Co-authored-by: Konsti Wohlwend <n2d4xc@gmail.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-05-15 23:56:40 +02:00
Zai Shi
5265327176
Fix package build with explicit index.js imports (#677)
<!--

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

-->

<!-- ELLIPSIS_HIDDEN -->

----

> [!IMPORTANT]
> Fixes ESM import issue by adding a plugin for implicit `index.js` and
renames interface files for consistency.
> 
>   - **Behavior**:
> - Adds `fixImportExtensions` plugin in `configs/tsup/js-library.ts` to
handle ESM imports with implicit `index.js`.
>   - **Renames**:
> - Renames `adminInterface.ts` to `admin-interface.ts` and updates
imports in `index.ts` and `admin-app-impl.ts`.
> - Renames `clientInterface.ts` to `client-interface.ts` and updates
imports in `server-interface.ts`.
> - Renames `serverInterface.ts` to `server-interface.ts` and updates
imports in `adminInterface.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 1fcd668be4. You can
[customize](https://app.ellipsis.dev/stack-auth/settings/summaries) this
summary. It will automatically update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Konsti Wohlwend <n2d4xc@gmail.com>
2025-05-15 23:55:59 +02:00
Zai Shi
387c071501
Fix brand icons (#679)
<!--

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

-->

<!-- ELLIPSIS_HIDDEN -->

----

> [!IMPORTANT]
> Refactor provider icon handling by introducing `ProviderIcon`
component and add Apple brand color.
> 
>   - **Components**:
> - Introduce `ProviderIcon` component in `providers.tsx` to encapsulate
icon rendering logic.
> - Replace inline icon rendering with `ProviderIcon` in
`page-client.tsx` and `ProviderSettingSwitch` in `providers.tsx`.
>   - **Brand Icons**:
>     - Add `apple` to `BRAND_COLORS` in `brand-icons.tsx`.
>   - **Misc**:
>     - Update imports in `page-client.tsx` to include `ProviderIcon`.
> 
> <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 9a6dd99a97. You can
[customize](https://app.ellipsis.dev/stack-auth/settings/summaries) this
summary. It will automatically update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->
2025-05-15 23:31:44 +02:00
Zai Shi
c28e4a636f
Handle OAuth consent_required error (#685)
<!--

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

-->

<!-- ELLIPSIS_HIDDEN -->

----

> [!IMPORTANT]
> Handle `consent_required` error in OAuth flow and update error message
in `ErrorPage`.
> 
>   - **Behavior**:
> - Handle `consent_required` error in `OAuthBaseProvider` in `base.tsx`
by throwing `KnownErrors.OAuthProviderAccessDenied()`.
> - Update error message in `ErrorPage` in `error-page.tsx` to reflect
both cancellation and denial scenarios.
>   - **Misc**:
> - Minor text change in `ErrorPage` to improve clarity of the error
message.
> 
> <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 e2aa5a4027. You can
[customize](https://app.ellipsis.dev/stack-auth/settings/summaries) this
summary. It will automatically update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->
2025-05-15 23:09:27 +02:00
Zai Shi
738f7dba86
Fix session fetching when there are no active sessions (#684)
<!--

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

-->

<!-- ELLIPSIS_HIDDEN -->

----

> [!IMPORTANT]
> Fixes session fetching in `crud.tsx` by handling empty
`refreshTokenObjs` in SQL query.
> 
>   - **Behavior**:
> - Fixes session fetching in `crud.tsx` when `refreshTokenObjs` is
empty by modifying the SQL query to return `FALSE` instead of an invalid
`ANY` clause.
>   - **SQL Query**:
> - Adjusts the `WHERE` clause in the `SELECT` statement to handle empty
`refreshTokenObjs` by using `Prisma.sql` to conditionally apply `ANY` or
`FALSE`.
> 
> <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 5fcfaaf981. You can
[customize](https://app.ellipsis.dev/stack-auth/settings/summaries) this
summary. It will automatically update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->
2025-05-15 23:09:10 +02:00
Konstantin Wohlwend
159dcfc94c Add comment explaining defaults 2025-05-15 14:04:51 -07:00
Konstantin Wohlwend
02b9378018 Fetch tenancy in non-GET /users/me
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
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
Preview Docs / run (push) Has been cancelled
Publish Docs / run (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-05-15 12:27:33 -07:00
Konstantin Wohlwend
c93393efa1 More instanceof replacements 2025-05-15 12:18:34 -07:00
Konstantin Wohlwend
8717a70adc No more instanceof KnownError 2025-05-15 12:13:19 -07:00
Konstantin Wohlwend
b5069c4782 No more instanceof StatusError 2025-05-15 11:35:53 -07:00
Konstantin Wohlwend
76c92aba07 Make /users/me faster 2025-05-15 11:01:56 -07:00
Konstantin Wohlwend
85359aab7a Add error message to Failed to send email error 2025-05-14 12:55:33 -07:00
Konstantin Wohlwend
375b80add9 Fix module 2025-05-14 09:44:27 -07:00
Konstantin Wohlwend
e0b5158d0d chore: update package versions 2025-05-13 16:00:40 -07:00
Konsti Wohlwend
5803b2ef6f
Fix CJS for stack-shared (#676)
Fixes #662, closes #667
2025-05-13 15:13:30 -07:00
Konstantin Wohlwend
7d56f52a25 Remove react-scan 2025-05-13 13:06:18 -07:00
Will
ec3875d1b7
Change JWT issuer (#656)
This PR address #651 

The `iss` domain [should
be](https://mojoauth.com/glossary/jwt-issuer/#:~:text=The%20authorization%20server%20can%20then%20use%20the%20%22iss%22%20claim%20to%20verify%20the%20validity%20of%20the%20JWT%2C%20and%20to%20determine%20which%20client%20is%20requesting%20access%20to%20the%20protected%20resources.)
a publicly accessible domain that can be used to verify the validity of
the JWT.

I believe this domain should be `api.stack-auth.com` as your `jwks.json`
file is located at this domain
(`https://api.stack-auth.com/api/v1/projects/<your-project-id>/.well-known/jwks.json`)

Alternatively, you could make `jwks.json` available at your
`https://access-token.jwt-signature.stack-auth.com` domain. Currently a
DNS lookup fails:

```
$> nslookup access-token.jwt-signature.stack-auth.com
Server:  one.one.one.one
Address:  1.1.1.1

*** one.one.one.one can't find access-token.jwt-signature.stack-auth.com: Non-existent domain
```

One example of why this is a problem is Convex, which allows auth
integration with any service following the OpenID Connect/JWKs standard.
Upon receiving a JWT, Convex will match the `iss` claim to the [custom
auth
config](https://docs.convex.dev/auth/advanced/custom-auth#server-side-integration)
it should use. It then attempts to connect to `iss` in order to validate
the JWT. If I switch the `iss` (in Convex config) to
`api.stack-auth.com`, then the `iss` claim doesn't match and auth fails.
If I leave it at `https://access-token.jwt-signature.stack-auth.com`,
then Convex tries to connect to
`https://access-token.jwt-signature.stack-auth.com` and gets a DNS
lookup fail and can't verify the token.

This may have implications for currently issued JWTs - so porting this
change may have to be done with care.

<!-- ELLIPSIS_HIDDEN -->

----

> [!IMPORTANT]
> Change JWT issuer to `https://api.stack-auth.com` for public
accessibility and validation.
> 
>   - **Behavior**:
> - Change JWT `iss` from
`https://access-token.jwt-signature.stack-auth.com` to
`https://api.stack-auth.com` in `decodeAccessToken()` and
`generateAccessToken()` in `tokens.tsx`.
> - Update test expectation for `iss` in `ensureParsableAccessToken()`
in `backend-helpers.ts`.
>   - **Rationale**:
> - Ensures `iss` is a publicly accessible domain for JWT validation.
>     - Addresses issue #651.
> 
> <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 00393b87ad. You can
[customize](https://app.ellipsis.dev/stack-auth/settings/summaries) this
summary. It will automatically update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->

---------

Co-authored-by: Zai Shi <zaishi00@outlook.com>
2025-05-13 22:06:01 +02:00
Zai Shi
0b443a056d
Fix docker restart (#670)
<!--

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

-->

<!-- ELLIPSIS_HIDDEN -->


----

> [!IMPORTANT]
> Fix Docker restart by processing environment variables in a temporary
working directory in `entrypoint.sh`.
> 
>   - **Behavior**:
> - Create `/tmp/processed` directory in `entrypoint.sh` to copy and
process files for environment variable replacement.
> - Replace environment variable sentinels in files within
`/tmp/processed` instead of `/app`.
> - Change working directory to `/tmp/processed` before starting backend
and dashboard.
>   - **Misc**:
> - Add logging for file copying to working directory in
`entrypoint.sh`.
> 
> <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 bb6ff27e90. You can
[customize](https://app.ellipsis.dev/stack-auth/settings/summaries) this
summary. It will automatically update as commits are pushed.</sup>


<!-- ELLIPSIS_HIDDEN -->

---------

Co-authored-by: Konsti Wohlwend <n2d4xc@gmail.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-05-13 21:55:37 +02:00
Zai Shi
5dc13defac
Fix Apple OAuth (#669)
<!--

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

-->

<!-- ELLIPSIS_HIDDEN -->


----

> [!IMPORTANT]
> Fix Apple OAuth by updating response status codes and adding ngrok
compatibility.
> 
>   - **Behavior**:
> - Update `statusCode` in `route.tsx` to accept 303 in addition to 307
for OAuth responses.
> - Modify `oauthResponseToSmartResponse()` in `oauth-helpers.tsx` to
map 302 to 303.
> - Add `ngrok-skip-browser-warning` header in `middleware.tsx` and
`clientInterface.ts` for ngrok compatibility.
>   - **Tests**:
> - Update expected status to 303 in `backend-helpers.ts` for OAuth
tests.
> 
> <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 ae3ec66e96. You can
[customize](https://app.ellipsis.dev/stack-auth/settings/summaries) this
summary. It will automatically update as commits are pushed.</sup>


<!-- ELLIPSIS_HIDDEN -->

---------

Co-authored-by: Konsti Wohlwend <n2d4xc@gmail.com>
2025-05-13 18:38:09 +02:00
Lukas Leeb
a258d98d11
Fix dead link in cli-authentication.mdx (#666)
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
Lint & build / lint_and_build (latest) (push) Has been cancelled
Preview Docs / run (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-05-13 01:12:40 +00:00
Zai Shi
e2386df5d4
Update internationalization.mdx 2025-05-12 19:19:35 +02:00
Zai Shi
097fbc6e4c
Fix docker (#664)
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
Lint & build / lint_and_build (latest) (push) Has been cancelled
Preview Docs / run (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
<!--

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

-->

<!-- ELLIPSIS_HIDDEN -->

----

> [!IMPORTANT]
> Enable Docker build by removing fail step and switch from `bcrypt` to
`bcryptjs` for password hashing.
> 
>   - **Docker Workflow**:
> - Removed temporary fail step in
`.github/workflows/docker-server-build.yaml` to enable Docker build
process.
>   - **Dependencies**:
> - Replaced `bcrypt` with `bcryptjs` in `package.json` and `hashes.tsx`
for password hashing.
>     - Updated `@types/bcrypt` to `@types/bcryptjs` in `package.json`.
>   - **Documentation**:
> - Added `docker/README.md` with instructions for building and running
Docker containers for server and emulator.
> 
> <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 c7a3ed9f11. You can
[customize](https://app.ellipsis.dev/stack-auth/settings/summaries) this
summary. It will automatically update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->
2025-05-08 01:31:03 +02:00
Htoo Pyae Lwin
ef3d134de2
fix: project permission methods availability (#634)
### Issues

<img width="937" alt="Screenshot 2568-04-18 at 00 45 30"
src="https://github.com/user-attachments/assets/6a94ceb6-d83f-489d-8ee5-26cbf7a7d287"
/>

<img width="937" alt="Screenshot 2568-04-18 at 00 46 40"
src="https://github.com/user-attachments/assets/0b12a962-f8c9-4009-bed6-62ae16778ee7"
/>


<!--

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

-->

<!-- ELLIPSIS_HIDDEN -->

----

> [!IMPORTANT]
> Add methods for handling project permissions and update existing
methods to support both team and project permissions.
> 
>   - **Behavior**:
> - Add `grantProjectPermission` and `revokeProjectPermission` methods
to `StackServerInterface` for handling project permissions.
> - Update `grantPermission` and `revokePermission` methods in
`_StackServerAppImplIncomplete` to handle both team and project
permissions.
>   - **Methods**:
> - Add `grantServerProjectPermission()` and
`revokeServerProjectPermission()` in `serverInterface.ts`.
> - Modify `grantPermission()` and `revokePermission()` in
`server-app-impl.ts` to support project permissions.
>   - **Misc**:
> - Update `operationIDs` in `index.ts` to include project permission
endpoints.
> 
> <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 c3f61d1b46. It will automatically
update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->
2025-05-08 01:19:19 +02:00
Htoo Pyae Lwin
a768174753
fix: auth page flash message (#628)
<!--

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

-->

Fixes https://github.com/stack-auth/stack-auth/issues/625

<!-- ELLIPSIS_HIDDEN -->

----

> [!IMPORTANT]
> Fixes flash message display by consolidating redirection logic in
`Inner` function of `auth-page.tsx`.
> 
>   - **Behavior**:
> - Consolidates conditions for automatic redirection in `Inner`
function of `auth-page.tsx` to ensure correct flash message display.
> - Adds check for `!props.automaticRedirect` when rendering
`PredefinedMessageCard` for signed-in users.
>   - **Formatting**:
>     - Removes unnecessary whitespace in `Inner` function.
>     - Adds space before self-closing tags in `Inner` function.
> 
> <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 8162ea2f9c. It will automatically
update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->
2025-05-08 01:12:48 +02:00
Htoo Pyae Lwin
466c891fab
chore: add arm support in docker build (#633)
<!--

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

-->

<!-- ELLIPSIS_HIDDEN -->

----

> [!IMPORTANT]
> Add ARM support to Docker build in GitHub Actions workflow by
including `linux/arm64` platform.
> 
>   - **GitHub Actions**:
> - Add ARM support to Docker build in
`.github/workflows/docker-server-build.yaml` by including `linux/arm64`
in `platforms` parameter of `docker/build-push-action`.
> 
> <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 10630c432b. It will automatically
update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->
2025-05-07 02:28:36 +02:00
Madison
133de58998
Docs api keys (#644)
Init API Keys docs updates.
<!-- ELLIPSIS_HIDDEN -->

----

> [!IMPORTANT]
> Add documentation and API handlers for creating and managing user and
team API keys.
> 
>   - **API Handlers**:
> - Updated `createApiKeyHandlers` in `handlers.tsx` to include metadata
for API key creation and validation.
> - `create` and `check` handlers now have descriptions, summaries, and
tags for API keys.
>   - **Documentation**:
> - Added `api-keys.mdx` to explain API key creation, management, and
usage for users and teams.
> - Updated `docs-template.yml` to include API Keys in the navigation.
> - Added `sdk/types/api-key.mdx` for detailed API key type definitions
and usage.
> - Updated `sdk/types/team.mdx` and `sdk/types/user.mdx` to include API
key functions for teams and users.
> 
> <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 369b06e7a4. You can
[customize](https://app.ellipsis.dev/stack-auth/settings/summaries) this
summary. It will automatically update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->

---------

Co-authored-by: Konsti Wohlwend <n2d4xc@gmail.com>
2025-05-07 01:39:23 +02:00
similiarity
3514853d7c
fix error on teams page and improve text when display name not set (#661)
<!--

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

-->

<!-- ELLIPSIS_HIDDEN -->

----

> [!IMPORTANT]
> Fix error on teams page by checking project config and improve display
name handling in `team-member-list-section.tsx`.
> 
>   - **Behavior**:
> - In `team-api-keys-section.tsx`, add `useStackApp` to check
`project.config.allowTeamApiKeys` before rendering API keys section.
> - In `team-member-list-section.tsx`, display "No display name set"
when `teamProfile.displayName` is not available.
>   - **Permissions**:
> - Modify `TeamApiKeysSection` to return `null` if
`manageApiKeysPermission` is false or `teamApiKeysEnabled` is false.
>   - **UI**:
> - Update `MemberListSectionInner` to show italicized, muted text when
display name is missing.
> 
> <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 ad84a474e8. You can
[customize](https://app.ellipsis.dev/stack-auth/settings/summaries) this
summary. It will automatically update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->

Co-authored-by: Konsti Wohlwend <n2d4xc@gmail.com>
2025-05-06 22:28:56 +02:00
Zai Shi
dddc620ba6 fix team invitation link
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
Lint & build / lint_and_build (latest) (push) Has been cancelled
Preview Docs / run (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
Update pull request branches / Update pull request branches (push) Has been cancelled
2025-05-04 10:45:39 -07:00
Konsti Wohlwend
bae04178cc
Endpoints branching (#659)
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
Lint & build / lint_and_build (latest) (push) Has been cancelled
Preview Docs / run (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
Co-authored-by: Zai Shi <zaishi00@outlook.com>
Co-authored-by: moritz <moritsch@student.ethz.ch>
2025-04-30 15:39:47 -07:00
Konsti Wohlwend
f3f2adcee7
Remove SmartRequest.auth.project.config (#658)
Co-authored-by: Zai Shi <zaishi00@outlook.com>
Co-authored-by: moritz <moritsch@student.ethz.ch>
2025-04-30 15:31:15 -07:00
Konstantin Wohlwend
47a7a439aa Return error when test email is rejected 2025-04-30 15:08:32 -07:00
Konstantin Wohlwend
6c1f746ab3 chore: update package versions
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
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
Preview Docs / run (push) Has been cancelled
Publish Docs / run (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-04-30 11:18:45 -07:00
Konstantin Wohlwend
335bc97027 Wrap migration into small transactions 2025-04-30 11:11:54 -07:00
Zai Shi
d9e2dae4c6
Config DB migration step 2 (#629)
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
Lint & build / lint_and_build (latest) (push) Has been cancelled
Preview Docs / run (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
Co-authored-by: Konsti Wohlwend <n2d4xc@gmail.com>
Co-authored-by: moritz <moritsch@student.ethz.ch>
2025-04-29 14:52:45 -07:00
Konstantin Wohlwend
2806b473ce chore: update package versions
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
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
Preview Docs / run (push) Has been cancelled
Publish Docs / run (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-04-29 10:41:11 -07:00
Konstantin Wohlwend
ead128680d Disable Docker build 2025-04-29 08:57:34 -07:00
Konsti Wohlwend
c25abaaa32
tsup for stack-shared (#647) 2025-04-28 21:26:52 -07:00
Konstantin Wohlwend
4b0b96ad9b chore: update package versions 2025-04-28 13:14:02 -07:00
Konstantin Wohlwend
e3891e540e Fix verify-data-integrity 2025-04-28 09:51:30 -07:00
Konstantin Wohlwend
2003238c53 Fix verify-data-integrity 2025-04-27 21:19:07 -07:00
Konstantin Wohlwend
517e8b2545 Improve verify-data-integrity 2025-04-27 17:31:28 -07:00
Konstantin Wohlwend
59a08011cc Fix types 2025-04-27 16:49:56 -07:00
Konstantin Wohlwend
d629e22076 Consistent TypeScript versions
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
Lint & build / lint_and_build (latest) (push) Has been cancelled
Preview Docs / run (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-04-25 18:21:58 -07:00
Konsti Wohlwend
8d6c6e314b
Revert "Fix/disable forgot password when auth disabled" (#649)
Reverts stack-auth/stack-auth#562
2025-04-25 17:22:23 -07:00
Naresh Kumar
0564d7d81a
Fix/disable forgot password when auth disabled (#562)
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
Lint & build / lint_and_build (latest) (push) Has been cancelled
Preview Docs / run (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
This PR addresses the issue where the /handler/forgot-password page
should not be accessible when password authentication is disabled.
Additionally, it improves the redirection behavior when a user is
already logged in.

### Changes:

Added a redirection check in the useEffect hook to ensure that logged-in
users are redirected to the appropriate page instead of staying on the
forgot-password page.

### Fixes:
Closes #292

### Test:
[Screencast from 2025-03-20
22-18-36.webm](https://github.com/user-attachments/assets/d626ba95-9d7f-46e6-b232-0320b171d130)

<!-- ELLIPSIS_HIDDEN -->

----

> [!IMPORTANT]
> Redirects logged-in users from `ForgotPassword` page and prevents
access when password authentication is disabled.
> 
>   - **Behavior**:
> - Redirects logged-in users from `ForgotPassword` page using
`useEffect` in `forgot-password.tsx`.
> - Prevents access to `ForgotPassword` when password authentication is
disabled.
>   - **Functions**:
>     - Adds `useEffect` hook in `ForgotPassword` to handle redirection.
>   - **Fixes**:
>     - Closes issue #292.
> 
> <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 9c93cb4078. It will automatically
update as commits are pushed.</sup>

<!-- ELLIPSIS_HIDDEN -->

---------

Co-authored-by: Zai Shi <zaishi00@outlook.com>
2025-04-24 03:19:40 +02:00
Konstantin Wohlwend
e781fe8384 Log client version 2025-04-23 09:47:06 -07:00