dev diary 20251120
dev.to·2h·
Discuss: DEV
Flag this post

today i didn’t sleep well, so my brain doesn’t work. at least once a week there are such a days, stand with some music, soft drink, ect...

setting user name in app

on site display, there is the “hello ! ****” this user name is something kind of hash code because i don’t set the username in this app. so i study how to set the username in this app, in /amplify/data/resouce.ts

import { defineAuth, secret } from "@aws-amplify/backend";

export const auth = defineAuth({
loginWith: {
email: true,
},
userAttributes: {
nickname: {
required: true,
mutable: true,
},

familyName: {
required: false,
mutable: true,
},
givenName: {
required: false,
mutable: true,
},
},
});

and in app/setting/userProfileEditor.tsx

// app/setting/UserProfileEditor.tsx
'use client'
import...

Similar Posts

Loading similar posts...