I'm using AWS Amplify and I'm wondering is it best to store user attributes as custom Cognito attributes or in a user table for AppSync?
'username': 'jdoe',
'password': 'mysecurepassword#123',
'attributes': {
'email': 'me@domain.com',
'phone_number': '+12135555555',
'custom:favorite_flavor': 'Cookie Dough' // custom attribute, not standard
}
type User
@model
@auth(
rules: [
{allow: owner, ownerField: "owner", operations: [create, update, delete, read]},
])
{
id: ID!
owner: String
favoriteFlavor: String
}
If the AppSync approach is best, should other fields carry over to the table (like the name or email)?
Thanks!
From my experience, use both is the best.
Hope this help you.