diff --git a/components/Shell.tsx b/components/Shell.tsx index e0cd0f892b..3810f5d5f8 100644 --- a/components/Shell.tsx +++ b/components/Shell.tsx @@ -74,6 +74,7 @@ export default function Shell(props) { { profileDropdownExpanded && (
+ Your Public Page Your Profile Login & Security @@ -145,4 +146,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 8f8e6d5a9e..83d0e71591 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 @@ -382,4 +382,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 +}