Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: smtp for password reset #4630

Merged
merged 19 commits into from
Sep 18, 2024
Merged

feat: smtp for password reset #4630

merged 19 commits into from
Sep 18, 2024

Conversation

RogerHYang
Copy link
Contributor

resolves #4602
resolves #4054
resolves #4055

@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Sep 16, 2024
app/src/Routes.tsx Outdated Show resolved Hide resolved
app/src/pages/auth/InitiatePasswordResetForm.tsx Outdated Show resolved Hide resolved
body: JSON.stringify(params),
});
if (!response.ok) {
setError("Failed attempt");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error is not clear - make the message more clear to the user what might be wrong

setError("Failed attempt");
return;
}
} catch (error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure you need this try catch here

app/src/pages/auth/InitiatePasswordResetForm.tsx Outdated Show resolved Hide resolved
src/phoenix/server/email/password_reset.html Outdated Show resolved Hide resolved
src/phoenix/server/email/sender.py Outdated Show resolved Hide resolved
src/phoenix/config.py Outdated Show resolved Hide resolved
src/phoenix/config.py Outdated Show resolved Hide resolved
src/phoenix/config.py Outdated Show resolved Hide resolved
src/phoenix/db/models.py Outdated Show resolved Hide resolved
src/phoenix/server/api/routers/auth.py Outdated Show resolved Hide resolved
src/phoenix/server/api/routers/auth.py Outdated Show resolved Hide resolved
src/phoenix/config.py Outdated Show resolved Hide resolved
integration_tests/auth/test_auth.py Outdated Show resolved Hide resolved
src/phoenix/server/email/types.py Outdated Show resolved Hide resolved
body: JSON.stringify(params),
});
if (!response.ok) {
setError("Failed attempt");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a better error message

return;
}
} catch (error) {
setError("Failed attempt");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs a better error message

Comment on lines +38 to +40
setMessage(
"A link to reset your password has been sent. Check your email for details."
);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can do the follow-up but this typically swaps out the UI

app/src/pages/auth/LoginForm.tsx Outdated Show resolved Hide resolved
Comment on lines +14 to +18
const token = searchParams.get("token");
if (!token) {
navigate("/login");
return null;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would probably just show an error. We need a "back to login" link anyways. Redirecting typically should happen on user-action - it might be confusing otherwise.

src/phoenix/config.py Outdated Show resolved Hide resolved
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Sep 18, 2024
src/phoenix/config.py Show resolved Hide resolved
src/phoenix/config.py Show resolved Hide resolved
src/phoenix/server/api/routers/auth.py Show resolved Hide resolved
src/phoenix/server/api/routers/auth.py Show resolved Hide resolved
src/phoenix/server/api/routers/auth.py Show resolved Hide resolved
app/src/pages/auth/ForgotPasswordForm.tsx Outdated Show resolved Hide resolved
@RogerHYang RogerHYang merged commit 34d5763 into auth Sep 18, 2024
17 checks passed
@RogerHYang RogerHYang deleted the password-reset branch September 18, 2024 20:56
RogerHYang added a commit that referenced this pull request Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XXL This PR changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants