Skip to content

ANW-1477 allow users to recover / reset password #2979

Merged
quoideneuf merged 3 commits intoarchivesspace:masterfrom
quoideneuf:ANW-1477-reset-password
Jun 8, 2023
Merged

ANW-1477 allow users to recover / reset password #2979
quoideneuf merged 3 commits intoarchivesspace:masterfrom
quoideneuf:ANW-1477-reset-password

Conversation

@quoideneuf
Copy link
Copy Markdown
Contributor

@quoideneuf quoideneuf commented Apr 11, 2023

For local testing, recommend using https://www.npmjs.com/package/fake-smtp-server
I could not get the npm install working, so used docker:

# Run a fake smtp server:
# docker-compose -f docker-compose-fake-smtp.yml up --detach

services:
  mail:
    container_name: fake_smtp_server
    image: reachfive/fake-smtp-server
    ports:
      - "1025:1025"
      - "1080:1080"

with the following in common/config.rb:


AppConfig[:email_delivery_method] = :smtp
AppConfig[:email_smtp_settings] = {
     address:              'localhost',
     port:                 1025,
     domain:               'foobar.com',
     user_name:            'hello',
     password:             'goodbye',
     openssl_verify_mode:  'none'
}
AppConfig[:email_perform_deliveries] = true
AppConfig[:email_raise_delivery_errors] = true

AppConfig[:allow_password_reset] = true

ANW-1477-screencast

@quoideneuf quoideneuf force-pushed the ANW-1477-reset-password branch 4 times, most recently from d7b91f9 to 358a104 Compare April 11, 2023 19:12
@quoideneuf quoideneuf marked this pull request as ready for review April 12, 2023 15:28
Copy link
Copy Markdown
Contributor

@donaldjosephsmith donaldjosephsmith left a comment

Choose a reason for hiding this comment

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

Nice work 👍🏻 I was a little surprised to see that it appears we never had fallbacks enabled for translations, so I'm glad you set that up. The only thing I'm wondering about is if a 5 minute expiration might be a little short for some setups with slow external email servers. I guess ideally we would make that a configuration option at some point.

@quoideneuf
Copy link
Copy Markdown
Contributor Author

Nice work 👍🏻 I was a little surprised to see that it appears we never had fallbacks enabled for translations, so I'm glad you set that up. The only thing I'm wondering about is if a 5 minute expiration might be a little short for some setups with slow external email servers. I guess ideally we would make that a configuration option at some point.

Those suggestions all sound good. I also noticed the password form is not hiding the text as it should.

@quoideneuf quoideneuf force-pushed the ANW-1477-reset-password branch from c4c5014 to 3583d6b Compare June 1, 2023 21:35
@quoideneuf
Copy link
Copy Markdown
Contributor Author

@donaldjosephsmith I changed the time window from 5 to 30 minutes, and corrected the input field for the new password form.

@quoideneuf quoideneuf merged commit 00b81a3 into archivesspace:master Jun 8, 2023
@quoideneuf quoideneuf deleted the ANW-1477-reset-password branch June 9, 2023 13:02
Comment thread frontend/app/models/user.rb
Comment thread backend/app/controllers/users.rb
Comment thread frontend/config/locales/en.yml
@crugas
Copy link
Copy Markdown
Contributor

crugas commented Nov 7, 2024

Did this update come with any changes to the API, such as for the Update a user's account endpoint? @quoideneuf

@quoideneuf
Copy link
Copy Markdown
Contributor Author

Did this update come with any changes to the API, such as for the Update a user's account endpoint? @quoideneuf

@crugas I don't think so.

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.

5 participants