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

CU862j2cj0p Password Reset via Email #172

Merged
merged 14 commits into from
Jan 29, 2024
Merged

Conversation

adam-sutton-1992
Copy link
Collaborator

Only the frontend changes have been done via Login.vue.

Backend changes to be added when complete.

@tomolopolis
Copy link
Member

Task linked: CU-862j2cj0p Password reset email forms

@adam-sutton-1992
Copy link
Collaborator Author

The original commit had more in the front end than required as this can be done with default django forms.

I've since added this functionality. Reset password is now found at <url>/reset_password/ - or via a forgotten password href.

A reset link is sent out to a valid email address where users choose their new password.

The only additional change will be how do we set the email address, password, and server info:

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = os.environ.get('EMAIL_USER')
EMAIL_HOST_PASSWORD = os.environ.get('EMAIL_PASS')

This is what is set currently, as I've tested on gmail (and since removed password). We could have a global medcat / cogstack email, or encourage users to set up their own .env with the variables set.

Copy link
Member

@tomolopolis tomolopolis left a comment

Choose a reason for hiding this comment

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

great stuff - lgtm

@tomolopolis tomolopolis merged commit 74fe4e9 into master Jan 29, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants