diff --git a/components/Shell.tsx b/components/Shell.tsx index bafbd3869a..386832c02c 100644 --- a/components/Shell.tsx +++ b/components/Shell.tsx @@ -66,6 +66,7 @@ export default function Shell(props) { { profileDropdownExpanded && (
+ Your Public Page Your Profile Login & Security @@ -137,4 +138,4 @@ export default function Shell(props) {
); -} \ No newline at end of file +} diff --git a/pages/api/auth/[...nextauth].tsx b/pages/api/auth/[...nextauth].tsx index 2b16e94c88..18236db166 100644 --- a/pages/api/auth/[...nextauth].tsx +++ b/pages/api/auth/[...nextauth].tsx @@ -40,4 +40,18 @@ export default NextAuth({ } }) ], -}); \ No newline at end of file + callbacks: { + async jwt(token, user, account, profile, isNewUser) { + // Add username to the token right after signin + if (user?.username) { + token.username = user.username + } + return token; + }, + async session(session, token) { + session.user = session.user || {} + session.user.username = token.username; + return session; + }, + }, +}); diff --git a/pages/availability/index.tsx b/pages/availability/index.tsx index 9369a0b019..e6fdba9c70 100644 --- a/pages/availability/index.tsx +++ b/pages/availability/index.tsx @@ -158,7 +158,7 @@ export default function Availability(props) { {eventType.length} minutes - {eventType.hidden && View} + View Edit @@ -381,4 +381,4 @@ export async function getServerSideProps(context) { return { props: {user, types}, // will be passed to the page component as props } -} \ No newline at end of file +}