mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-13 21:01:21 +08:00
|
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
|
||
|---|---|---|
| .. | ||
| init-stack | ||
| js | ||
| react | ||
| stack | ||
| stack-emails | ||
| stack-sc | ||
| stack-shared | ||
| stack-ui | ||
| template | ||