diff --git a/src/packages/auth/open-id-connect-auth/use-oidc.tsx b/src/packages/auth/open-id-connect-auth/use-oidc.tsx index 3581f4118..213ae8539 100644 --- a/src/packages/auth/open-id-connect-auth/use-oidc.tsx +++ b/src/packages/auth/open-id-connect-auth/use-oidc.tsx @@ -11,11 +11,11 @@ type OidcWrapperTypes = { }; export const LoginComponent = () => { - const { isUserLoggedIn, login } = useOidc({ + const { login } = useOidc({ assertUserLoggedIn: false, }); - if (!isUserLoggedIn) { + if (login) { login({ doesCurrentHrefRequiresAuth: true, }); diff --git a/src/packages/utils/hooks/organizations.ts b/src/packages/utils/hooks/organizations.ts index cbc704635..2def9cceb 100644 --- a/src/packages/utils/hooks/organizations.ts +++ b/src/packages/utils/hooks/organizations.ts @@ -6,6 +6,7 @@ import { transformModelToSelectOptions } from '../transformer'; export const useOrganizations = () => { return useQuery({ + initialData: [], queryKey: ['organization'], queryFn: (): Promise => { return OrganisationsApi.getOrganisations() as Promise;