This adds the functional behavior for prompting the user to reset their password if they're attempting to login but don't have a password set or any other credential mechanism (e.g. touchstone).
Note: this does not address any look and feel discrepancies vs the designs, it is purely a functional change.
I also added some limited nix flake setup for me to have a workable local dev environment - it doesn't impact functionality here.
Screenshots (if appropriate):
If you don't have "forgot password" enabled for the realm:
If you do have it enabled:
How can this be tested?
Create a user with no password in the admin interface
Verify "Forgot password" is turned off
Attempt to login as that user and verify that you get an error message that we can't log them in. In practice we shouldn't have this setup this way, but it needed to be handled as it is a potential state and having a helpful error message is better than none.
Turn on the "forgot password" feature for the realm.
Try to login again, you should get the prompt to reset your password and it should navigate to the reset password page.
At this point we've simply navigated the user to the password reset page - anything further isn't effected by this PR (i.e. if password reset works in general, it'll work here too).
What are the relevant tickets?
Part of https://github.com/mitodl/hq/issues/3473
Description (What does it do?)
This adds the functional behavior for prompting the user to reset their password if they're attempting to login but don't have a password set or any other credential mechanism (e.g. touchstone).
Note: this does not address any look and feel discrepancies vs the designs, it is purely a functional change.
I also added some limited nix flake setup for me to have a workable local dev environment - it doesn't impact functionality here.
Screenshots (if appropriate):
If you don't have "forgot password" enabled for the realm:
If you do have it enabled:
How can this be tested?