79299122

Date: 2024-12-21 09:02:25
Score: 2
Natty:
Report link

as @rw_ pointed out, my UserProfile.create in amplify/auth/post-confirmation/handler.ts and the UserProfile defined in amplify/data/resource.ts had different attributes. I updated the UserProfile model and changed name to email. This made the function work

amplify/data/resource.ts

const schema = a.schema({ 
  UserProfile: a 
    .model({
      email: a.string().required() // changed from 'name'
      ...
    })
    ...
})
...
Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @rw_
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: noor soreti