Skip to content

Commit 7ac5b56

Browse files
author
Emile Frey
committed
updated the console email and readme
1 parent 358ba9b commit 7ac5b56

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ $id = $(docker ps -aqf "name=django-react-postgres-boilerplate_backend")
4343
docker logs --tail 1000 -f $id
4444
```
4545

46-
Upon submitting a valid email, you should get a path like /password_reset?token=abcdefgxyz123; paste this in your browser after localhost:3000 to access the password reset form. The password reset form validates the token and allows the user to provide a new password.
46+
Upon submitting a valid email, you should get a path like http://localhost:300/password_reset?token=abcdefgxyz123; paste this in your browser to access the password reset form. The password reset form first validates the token; if the token is valid, it presents the password reset interface and allows the user to provide a new password.
4747

4848
Check out the Django docs starting [here](https://docs.djangoproject.com/en/3.1/topics/email/#smtp-backend) in order to update the Email Backend from a console output to an actual SMTP backend.
4949

backend/users/signals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
def password_reset_token_created(sender, instance, reset_password_token, *args, **kwargs):
88

99
# email_plaintext_message = "{}?token={}".format(reverse('password_reset:reset-password-request'), reset_password_token.key)
10-
email_plaintext_message = "{}?token={}".format('/password_reset/', reset_password_token.key)
10+
email_plaintext_message = "http://localhost:3000{}?token={}".format('/password_reset/', reset_password_token.key)
1111
print(email_plaintext_message)
1212
print("!" * 50)
1313
send_mail(

frontend/src/components/Login/PasswordReset.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export const PasswordResetForm: React.FC<PasswordResetFormProps> = (props: Passw
105105
autoFocus
106106
onChange={handleFormFieldChange}
107107
error={!passwordsMatch}
108-
helperText={!passwordsMatch ? "Passwords don't match" : null}
108+
helperText={!passwordsMatch ? "Passwords do not match" : null}
109109
/>
110110
<TextField
111111
margin="normal"
@@ -119,7 +119,7 @@ export const PasswordResetForm: React.FC<PasswordResetFormProps> = (props: Passw
119119
autoComplete="off"
120120
onChange={handleFormFieldChange}
121121
error={!passwordsMatch}
122-
helperText={!passwordsMatch ? "Passwords don't match" : null}
122+
helperText={!passwordsMatch ? "Passwords do not match" : null}
123123
/>
124124
</>}
125125
<ValidationMessages validationErrors={validationErrors} />

frontend/src/components/Login/PasswordUpdate.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function PasswordUpdate(props: AuthProps) {
5757
e.preventDefault();
5858
setIsLoading(true)
5959
if (new_password1 !== new_password2) {
60-
setValidationErrors({ "error": ["Passwords don't match!"] })
60+
setValidationErrors({ "error": ["Passwords do not match!"] })
6161
} else if (new_password1 === "") {
6262
setValidationErrors({ "error": ["Password can't be blank!"] })
6363
}
@@ -119,7 +119,7 @@ function PasswordUpdate(props: AuthProps) {
119119
id="new_password1"
120120
onChange={handleFormFieldChange}
121121
error={!passwordsMatch}
122-
helperText={!passwordsMatch ? "Passwords don't match" : null}
122+
helperText={!passwordsMatch ? "Passwords do not match" : null}
123123
/>
124124
<TextField
125125
variant="outlined"
@@ -132,7 +132,7 @@ function PasswordUpdate(props: AuthProps) {
132132
id="new_password2"
133133
onChange={handleFormFieldChange}
134134
error={!passwordsMatch}
135-
helperText={!passwordsMatch ? "Passwords don't match" : null}
135+
helperText={!passwordsMatch ? "Passwords do not match" : null}
136136
/>
137137
<ValidationMessages validationErrors={validationErrors} />
138138
{isLoading && <LinearProgress color="secondary" />}

0 commit comments

Comments
 (0)