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

Localization of password-change errors with OktaError? #1345

@george-hawkins-work

Description

@george-hawkins-work

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?

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