Skip to content

Conversation

sdzh-atlassian
Copy link
Member

@sdzh-atlassian sdzh-atlassian commented Aug 30, 2025

What Is This Change?

This is kind of a proposed enhancement? Feel free to merge, nuke or iterate :)

This PR introduces the 1st part of our credential-saving logic as validation on the password input - basically, when user hits enter, we try to ping /rest/api/2/myself with the assembled credentials first, and show an error message if it fails.

There are 2 alternatives to this:

  • Don't do anything - user gets error at the end of the flow and has to restart from scratch
  • Fail during a special loading state like what we have for OAuth. Honestly, I kinda like that one better, but maybe we can iterate?

Works for API token:
image

Works for server auth - although we might need to do the special ssl/path settings before password for this to work in all cases:
image

How Has This Been Tested?

Tried this against API token and server auth with instenv - in case of the server auth, the correct input takes a bit of time and correctly shows the loading state

Edit: please consider #875 to address the edge cases

Basic checks:

  • npm run lint
  • npm run test

input.validationMessage = errorMessage || undefined;
});
}
if (props.debounceValidationMs) {
Copy link
Member Author

Choose a reason for hiding this comment

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

Just removing the extra conditional here since it prevented validationMessage reset

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.

1 participant