Skip to content

Usability Improvements #27

Description

@edjiang

Hey -- I know you'll probably be updating this for the Client API soon, so I want to suggest two improvements:

  1. The "confirm your password" field in /profile is not clearly labeled as such. As such, it causes confusion.

  2. In server.js, there's this snippet of code:

  if (req.body.password) {
    var application = req.app.get('stormpathApplication');

    application.authenticateAccount({
      username: req.user.username,
      password: req.body.existingPassword
    }, function (err) {
      if (err) {
        return writeError('The existing password that you entered was incorrect.');
      }

      req.user.password = req.body.password;

      saveAccount();
    });
  } else {
    saveAccount();
  }

In pseudocode:

If a password is submitted
    Verify password

    If verified, save data
    else error
If password isn't submitted
    save data

The password check doesn't really accomplish any specific goal since it doesn't really gate anything in the API, and would confuse people learning from this example. Either enforce the password verification, or don't enforce it -- not both!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions