I’m looking for a way to set a custom Attribute on...
# help
d
I’m looking for a way to set a custom Attribute on the Auth construct with some default value. Any examples on that around?
f
@Daniel Gato are you looking to set custom attributes on the user pool?
Something like this should work
Copy code
new Auth(this, "Auth", {
  cognito: {
    userPool: {
      customAttributes: {
        'joinedOn': new cognito.DateTimeAttribute(),
      },
    },
  },
});
d
Thank you. Do you know a way to give it a default value?
f
hmm.. don’t think so… it seems only possible to do it in application code https://stackoverflow.com/questions/47875257/how-to-set-default-values-for-user-attributes-in-aws-cognito
d
Then I will set a some trigger for that. thanks