feat: Implement the ability to login via multiple means when signed up via google/non-cal providers (#14082)

Co-authored-by: zomars <[email protected]>
This commit is contained in:
Anwar Sadathandzomars authored and GitHub committed 2024-04-10 14:38:39 -07:00
1 parent e30b41a85a
commit 4565c3311c
21 files changed
+270 -120

No files matched your search

@@ -138,7 +138,7 @@ const organizationRequiredKeys = ["organization"];
const useTabs = () => {
const session = useSession();
const { data: user } = trpc.viewer.me.useQuery();
const { data: user } = trpc.viewer.me.useQuery({ includePasswordAdded: true });
const orgBranding = useOrgBranding();
const isAdmin = session.data?.user.role === UserPermissionRole.ADMIN;
@@ -153,7 +153,8 @@ const useTabs = () => {
} else if (
tab.href === "/settings/security" &&
user?.identityProvider === IdentityProvider.GOOGLE &&
!user?.twoFactorEnabled
!user?.twoFactorEnabled &&
!user?.passwordAdded
) {
tab.children = tab?.children?.filter(
(childTab) => childTab.href !== "/settings/security/two-factor-auth"