2023-04-13 13:26:02 +02:00
|
|
|
import { ZitadelApp } from "./app";
|
2023-04-06 18:57:58 +02:00
|
|
|
import { authMiddleware } from "./middleware";
|
|
|
|
|
|
2023-04-14 13:35:27 +02:00
|
|
|
// const createClient = <Client>(
|
|
|
|
|
// definition: CompatServiceDefinition,
|
|
|
|
|
// accessToken: string
|
|
|
|
|
// ) => {
|
|
|
|
|
// const channel = createChannel(process.env.ZITADEL_API_URL ?? "");
|
|
|
|
|
// return createClientFactory()
|
|
|
|
|
// .use(authMiddleware(accessToken))
|
|
|
|
|
// .create(definition, channel) as Client;
|
|
|
|
|
// };
|
2023-04-06 18:57:58 +02:00
|
|
|
|
2023-04-14 13:35:27 +02:00
|
|
|
export async function getAuth(app?: ZitadelApp) {
|
|
|
|
|
// return createClient<AuthServiceClient>(
|
|
|
|
|
// AuthServiceDefinition as CompatServiceDefinition,
|
|
|
|
|
// ""
|
|
|
|
|
// );
|
2023-04-06 18:57:58 +02:00
|
|
|
}
|