diff --git a/frontend/src/api/models/UserInfo.ts b/frontend/src/api/models/UserInfo.ts index bc2dc25c9..efffcd292 100644 --- a/frontend/src/api/models/UserInfo.ts +++ b/frontend/src/api/models/UserInfo.ts @@ -4,6 +4,7 @@ export type UserInfo = { username: string; + display_name: (string | null); avatar_b64str: (string | null); has_sumo_access: boolean; has_smda_access: boolean; diff --git a/frontend/src/framework/internal/components/LoginButton/loginButton.tsx b/frontend/src/framework/internal/components/LoginButton/loginButton.tsx index 7d13f6e14..427327f9b 100644 --- a/frontend/src/framework/internal/components/LoginButton/loginButton.tsx +++ b/frontend/src/framework/internal/components/LoginButton/loginButton.tsx @@ -49,7 +49,7 @@ export const LoginButton: React.FC = (props) => { function makeText() { if (authState === AuthState.LoggedIn) { - return userInfo?.username || "Unknown user"; + return userInfo?.display_name || userInfo?.username || "Unknown user"; } else if (authState === AuthState.NotLoggedIn) { return "Sign in"; } else {