Can't sign up with custom attribute of cognito by using Auth.signUp
Problem
Auth In aws-amplify and vue, I found the documents as follows
https://aws.amazon.com/jp/blogs/mobile/aws-amplify-adds-support-for-custom-attributes-in-amazon-cognito-user-pools/
I tried this but failed.
I found same issue as follows
#2167
I try again but failed with the following error.
{
code: "InvalidParameterException", name: "InvalidParameterException",
message: "Attributes did not conform to the schema: custom:s…re_name: Attribute does not exist in the schema.↵"
}
Why did this error occured ?
private get signUpParams () : SignUpParams {
return {
username: this.username,
password: this.password,
attributes: {
email: this.email,
family_name: this.familyName,
given_name: this.givenName,
'custom:store_name': this.storename
}
}
}
private handleSignUpClick () {
const self = this
Auth.signUp(self.signUpParams)
.then(user => {
return router.push('/verify')
}).catch(err => {
console.error(err)
})
}
Depencency
aws-amplify => 1.1.29 aws-amplify-vue => 0.2.12
@yukitaka13-1110 Hi, you need to add the custom attribute into your user pool schema which is in the Cognito User Pool Console -> Attributes:

Thank you for response !
I know the way to add custom attirbutes using cognito userpool console. I want to add custom attribute schema using aws-amplify or amplify-cli because it is troublesome to set each time of deployment.
Is there a way to do this using amplify-js or amplify-cli ? I think it is a function that everyone wants
@yukitaka13-1110 you can do this by using amplify-js but this might be achieved by using cli(I'm not sure). I will transfer this issue to the cli repo.
Thank you for transfering !
@yukitaka13-1110 I beleive you have another thread where you were able to figure out how to add custom attributes to your user-pool cloudformation configurations on create. Closing this issue for now. Feel free to re-open if you've further questions.
@kaustavghosh06 I could do it. Thank you so mush !
I have added the custom attributes, but it failed to signUp with my attributes value.
I am using aws-amplify-react-native package.
Here I need to change only the UI for signUp. But the functionality of the screen is same as the default signUp screen.
I have used Auth.signUp method to make the signUp, but it failed to signUP.
Anyone can clarify this. Attributes did not conform to the schema: name: The attribute is required\n
Auth.signUp({
username: this.state.email,
password: this.state.password,
attributes: {email: this.state.email},
})
Note: My default screens works fine before. Customized UI is not working.
In case if custom attributes, you need to go to your respective client settings and check this attribute as readable and writable.
@nihp please check your parameter json ``` "requiredAttributes": [ "email", "preferred_username" ],
for auth via email, I think you need to pass `preferred_username`. in my case its worked.
```
final option = CognitoSignUpOptions(userAttributes: {
'email': email.trim(),
'preferred_username': username.trim()
});
try {
final res = await Amplify.Auth.signUp(
username: email.trim(), password: password.trim(), options: option);
return res.isSignUpComplete;
} catch (e) {
throw e;
}
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.