#Is there a way to access secrets from the SecretContextProvider from the `validate` function?

3 messages · Page 1 of 1 (latest)

spark sage
#

is there a way to access the secrets from the validate function?
like setting and getting secret that the useTemplateSecret hook is using?

#

sample code

createScaffolderExtensions({
  component: TestComponent,
  name: "TestComponent",
  schema: TCSchema,
  validation: validateFunc
})


const validateFunc = (formData, errors, context) => {
  // how can i access secrets here?
}
timber pollen
#

Unfortunately not at this moment no. Potentially could do though. What would you need the secrets for?