@@ -5,9 +5,9 @@ import { Check, ChevronDown, Copy, Eye, EyeOff } from 'lucide-react'
55import { Alert , AlertDescription , Button , Input , Label } from '@/components/ui'
66import { Skeleton } from '@/components/ui/skeleton'
77import { useSession } from '@/lib/auth-client'
8- import { env } from '@/lib/env'
98import { isBillingEnabled } from '@/lib/environment'
109import { createLogger } from '@/lib/logs/console/logger'
10+ import { getBaseUrl } from '@/lib/urls/utils'
1111import { cn } from '@/lib/utils'
1212import { useOrganizationStore } from '@/stores/organization'
1313
@@ -441,7 +441,7 @@ export function SSO() {
441441 } )
442442 }
443443
444- const callbackUrl = `${ env . NEXT_PUBLIC_APP_URL } /api/auth/sso/callback/${ formData . providerId } `
444+ const callbackUrl = `${ getBaseUrl ( ) } /api/auth/sso/callback/${ formData . providerId } `
445445
446446 const copyCallback = async ( ) => {
447447 try {
@@ -551,14 +551,14 @@ export function SSO() {
551551 < div className = 'relative mt-2' >
552552 < Input
553553 readOnly
554- value = { `${ env . NEXT_PUBLIC_APP_URL } /api/auth/sso/callback/${ provider . providerId } ` }
554+ value = { `${ getBaseUrl ( ) } /api/auth/sso/callback/${ provider . providerId } ` }
555555 className = 'h-9 w-full cursor-text pr-10 font-mono text-xs focus-visible:ring-2 focus-visible:ring-primary/20'
556556 onClick = { ( e ) => ( e . target as HTMLInputElement ) . select ( ) }
557557 />
558558 < button
559559 type = 'button'
560560 onClick = { ( ) => {
561- const url = `${ env . NEXT_PUBLIC_APP_URL } /api/auth/sso/callback/${ provider . providerId } `
561+ const url = `${ getBaseUrl ( ) } /api/auth/sso/callback/${ provider . providerId } `
562562 navigator . clipboard . writeText ( url )
563563 setCopied ( true )
564564 setTimeout ( ( ) => setCopied ( false ) , 1500 )
0 commit comments