T
tRPC

Vanilla Client Authentication

Vanilla Client Authentication

Ppedro10/25/2023
How to authenticate using the vanilla client? I want to consume this route as the authenticated user, but I couldn't find how to do this. Everything's working fine but this. Couldn't find anything on the docs
export const edgeClient = createTRPCProxyClient<AppRouter>({
links: [
httpBatchLink({
url: `${getBaseUrl()}/api/trpc`,
}),
],
transformer: SuperJSON,
});
export const edgeClient = createTRPCProxyClient<AppRouter>({
links: [
httpBatchLink({
url: `${getBaseUrl()}/api/trpc`,
}),
],
transformer: SuperJSON,
});
const introspect = await edgeClient.dataset.introspect.query(
{
datasetId: datasourceId,
workspaceId,
},
{
context: {
session,
},
},
);
const introspect = await edgeClient.dataset.introspect.query(
{
datasetId: datasourceId,
workspaceId,
},
{
context: {
session,
},
},
);

Looking for more? Join the community!

T
tRPC

Vanilla Client Authentication

Join Server