import { WorkOS } from '@workos-inc/node';

export const workos = new WorkOS(process.env.WORKOS_API_KEY!);

export const clientId = process.env.WORKOS_CLIENT_ID!;

export function getAuthorizationUrl(provider: 'GoogleOAuth' | 'AppleOAuth') {
  return workos.userManagement.getAuthorizationUrl({
    provider,
    clientId,
    redirectUri: process.env.WORKOS_REDIRECT_URI!,
  });
}
