/handler/forgot-password page shouldn't be shown when password auth is disabled
The page should show a message card saying that password authentication is disabled on the client side. The stack handler should redirect it back to home on the server side.
This is similar to how the other pages work
Hey @fomalhautb I would like to work on this issue.
Sure!
Hey @fomalhautb I would like to work on this issue.
Hey @fomalhautb
In the context of "redirect it back to home" Currently, on /handler/sign-in page if a user is already signed-in then it is showing a MessageCard and immediately redirecting to home page making it look like a glitch/blink.
https://github.com/user-attachments/assets/ee116e2d-6a92-447c-9886-658cfd5e6f52
packages/stack/src/components-page/auth-page.tsx
useEffect(() => {
if (props.automaticRedirect) {
if (user && !props.mockProject) {
runAsynchronously(props.type === 'sign-in' ? stackApp.redirectToAfterSignIn() : stackApp.redirectToAfterSignUp());
}
}
}, [user, props.mockProject, stackApp, props.automaticRedirect]);
if (user && !props.mockProject) {
return <PredefinedMessageCard type='signedIn' fullPage={props.fullPage} />;
}
I think we have 2 approaches
1. Delayed Redirect with User Acknowledgment Show the message, and after a short delay (e.g., 3-5 seconds), automatically redirect the user. This approach gives users time to read the message but then smoothly redirects them.
2. Toast Notification with Instant Redirect Immediately redirect the user while displaying a non-blocking toast or banner notification that informs the user they were already signed in. The user can see the message even after redirection. This keeps the user experience smooth and allows them to be redirected without a delay.
Same for the /handler/forgot-password if password auth is disabled
Kindly give your thoughts on this
Hey @fomalhautb
I know you must be busy but an opinion would be really helpful to finish this task.
@fomalhautb can i work on this
@Mubashirshariq are you still working on this issue
Is this issue resolved? if not I would like to work on it.