@astrale-os/cli 1.0.0-beta.2 → 1.0.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/lib/idp.ts CHANGED
@@ -214,6 +214,7 @@ export type IdpConfig = {
214
214
 
215
215
  export const BUILTIN_WORKOS_IDP_NAME = 'workos'
216
216
  const DEFAULT_WORKOS_API_HOST = 'https://api.workos.com'
217
+ const DEFAULT_WORKOS_CLIENT_ID = 'client_01KC29HET5F3QAQ8GNTPZ7F320'
217
218
  const WORKOS_CLIENT_ID_ENV_NAMES = ['WORKOS_CLIENT_ID', 'VITE_WORKOS_CLIENT_ID'] as const
218
219
 
219
220
  export function idpDir(name: string): string {
@@ -413,8 +414,10 @@ export function builtinIdpConfig(
413
414
  }
414
415
 
415
416
  export function workosClientIdFromEnv(env: NodeJS.ProcessEnv = process.env): string | undefined {
416
- return WORKOS_CLIENT_ID_ENV_NAMES.map((name) => env[name]?.trim()).find(
417
- (value): value is string => typeof value === 'string' && value.length > 0,
417
+ return (
418
+ WORKOS_CLIENT_ID_ENV_NAMES.map((name) => env[name]?.trim()).find(
419
+ (value): value is string => typeof value === 'string' && value.length > 0,
420
+ ) ?? DEFAULT_WORKOS_CLIENT_ID
418
421
  )
419
422
  }
420
423