Skip to content
This repository has been archived by the owner on Dec 12, 2018. It is now read-only.

Localization of password-change errors with OktaError? #1345

Open
george-hawkins-work opened this issue Jul 10, 2017 · 0 comments
Open

Localization of password-change errors with OktaError? #1345

george-hawkins-work opened this issue Jul 10, 2017 · 0 comments

Comments

@george-hawkins-work
Copy link

When a user attempted to change their password with the old Stormpath backend we used to get back a code, e.g. 2007 for "password too short", and we could then map this code to localized text for the end user.

Now with the Okta backend ResourceException.getCode() always returns 0. We can call e.getStormpathError().getMessage() and get something like:

password: Password requirements were not met. Your password must have at least 8 characters, a lowercase letter, an uppercase letter, a number, no parts of your username.

This maybe useful for our internal logging but we can't just pass this on to non-English end users. Scanning the error text for strings like "requirements were not met" is obviously not the way to go - can we get codes similar to those provided by the old Stormpath backend that can properly be mapped to localized error messages?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant