Files
zerobyte/app/client/hooks/use-org-context.ts
Nico 7a3932f969 feat: OIDC (#564)
* feat: oidc

feat: organization switcher

refactor: org context

feat: invitations

GLM

* feat: link current account

* refactor: own page for sso registration

* feat: per-user account management

* refactor: code style

* refactor: user existing check

* refactor: restrict provider configuration to super admins only

* refactor: cleanup / pr review

* chore: fix lint issues

* chore: pr feedbacks

* test(e2e): automated tests for OIDC

* fix: check url first for sso provider identification

* fix: prevent oidc provider to be named "credential"
2026-02-27 23:13:54 +01:00

14 lines
424 B
TypeScript

import { useSuspenseQuery } from "@tanstack/react-query";
import { useServerFn } from "@tanstack/react-start";
import { getOrganizationContext } from "~/server/lib/functions/organization-context";
export function useOrganizationContext() {
const getOrgContext = useServerFn(getOrganizationContext);
const { data } = useSuspenseQuery({
queryKey: ["organization-context"],
queryFn: getOrgContext,
});
return data;
}