dev diary 20251120
dev.to·11w·
Discuss: DEV

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...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help