Is there an 8.3 example for using a password in a SettingsRecord and SettingsResource through the API? I want the user to be able to configure a token (password) for my module. My SettingsRecord uses an EncodedStringField type. Currently my SettingsResource treats the token as a String (which is probably wrong).
Using chrome debug I was able to figure out to call the /data/api/v1/encryption/encrypt endpoint to encrypt the token. I then send via a PUT to update my record over the API and I get a 422. I’m pretty sure I need to change my SettingsResource to pass the JSON through to the record… but I am struggling. Any examples of custom records –> API –> react app would be hugely useful.
Got it and thank you! Does this mean the old Records are gone? Said another way, using the resource alone the properties are persisted in the modules data/config/resources/core/your_namespace/your_settings_bucket/config.json file?
I have no idea how anything front end is documented or supposed to be discoverable, but I think there's a PasswordInput react component in the public web UI stuff that is meant to be used with SecretConfig on the backend.
Like Kevin mentioned above, we use the React component PasswordInput under the hood when the decorator @FormField(FormFieldType.SECRET) is applied to your class field. Currently the React component is not available for public consumption, but we are taking steps to get those components ready. Thanks.