SmythOS Studio: Open-Source Visual AI Agent Builder and deployable runtime stack from SmythOS. Start with an intuitive drag-and-drop workspace, extend with custom code, and deploy your agents anywhere — local, cloud, or edge — with full governance and control.
JavaScript a2aagentic-aiai-agentsdevtoolsmcp-clientn8n-alternativeno-codeopen-sourceorchestrationsmythosvisual-builder
Enhance AuthWidget and Embodiment Modals with Redirect URIs and Domain Adjustments
Muhammad Hamza Khandda417d802b8
diff --git a/packages/app/src/react/features/agent-settings/components/Security/AuthWidget.tsx b/packages/app/src/react/features/agent-settings/components/Security/AuthWidget.tsxindex f06001c5..a587c4d1 100644--- a/packages/app/src/react/features/agent-settings/components/Security/AuthWidget.tsx+++ b/packages/app/src/react/features/agent-settings/components/Security/AuthWidget.tsx@@ -68,6 +68,8 @@ const AuthWidget = ({ isWriteAccess }: Props) => {const [testTokenEndpoint, setTestTokenEndpoint] = useState<string>('');const [prodAuthorizeEndpoint, setProdAuthorizeEndpoint] = useState<string>('');const [prodTokenEndpoint, setProdTokenEndpoint] = useState<string>('');+ const [testRedirectEndpoint, setTestRedirectEndpoint] = useState<string>('');+ const [prodRedirectEndpoint, setProdRedirectEndpoint] = useState<string>('');const [showBearerToken, setShowBearerToken] = useState(false);const [showClientSecret, setShowClientSecret] = useState(false);@@ -158,10 +160,12 @@ const AuthWidget = ({ isWriteAccess }: Props) => {setTestAuthorizeEndpoint(`https://${testDomain}/oauth/authorize`);setTestTokenEndpoint(`https://${testDomain}/oauth/token`);+ setTestRedirectEndpoint(`https://${testDomain}/emb/auth/callback`);const prodEndpoints = prodDomain ? `https://${prodDomain}` : '...';setProdAuthorizeEndpoint(`${prodEndpoints}/oauth/authorize`);setProdTokenEndpoint(`${prodEndpoints}/oauth/token`);+ setProdRedirectEndpoint(`${prodEndpoints}/emb/auth/callback`);}, [serverData, agentId, userDomain, selectedAuth]);const saveWorkSpaceAuth = useCallback(@@ -362,11 +366,11 @@ const AuthWidget = ({ isWriteAccess }: Props) => {Token <span className="text-red-500">*</span></label><div className="relative">- <input- id="bearer-token"- type={showBearerToken ? 'text' : 'password'}- placeholder="Enter your bearer token"- value={bearerConfig.token}+ <input+ id="bearer-token"+ type={showBearerToken ? 'text' : 'password'}+ placeholder="Enter your bearer token"+ value={bearerConfig.token}onChange={(e) => setBearerConfig((prev) => ({ ...prev, token: e.target.value }))}className={`w-full p-2 text-sm border rounded-md bg-white ${validationErrors.bearerToken@@ -416,6 +420,26 @@ const AuthWidget = ({ isWriteAccess }: Props) => {{selectedAuth === 'oauth-oidc' && (<div className="mt-4 space-y-4">+ <div className="bg-amber-50 border border-amber-200 rounded-md p-3">+ <p className="text-amber-800 text-xs">+ <strong>Note:</strong> To use OAuth OIDC, you need to set the redirect URI in the+ OAuth OIDC settings.+ <br />+ <br />+ <code className="block max-w-full overflow-x-auto break-all whitespace-pre-wrap">+ Test Redirect URI:+ <br />+ {testRedirectEndpoint}+ </code>+ <br />+ <code className="block max-w-full overflow-x-auto break-all whitespace-pre-wrap">+ Prod Redirect URI:+ <br />+ {prodRedirectEndpoint}+ </code>+ </p>+ </div>+<div><labelhtmlFor="oidc-endpoint"diff --git a/packages/app/src/react/features/embodiments/alexa-embodiment-modal.tsx b/packages/app/src/react/features/embodiments/alexa-embodiment-modal.tsxindex f1281e43..0544828c 100644--- a/packages/app/src/react/features/embodiments/alexa-embodiment-modal.tsx+++ b/packages/app/src/react/features/embodiments/alexa-embodiment-modal.tsx@@ -56,7 +56,7 @@ const VoiceEmbodimentModal: React.FC<VoiceEmbodimentModalProps> = ({const devUrl = devDomain && scheme ? `${scheme}://${devDomain}/alexa` : '';const prodUrl = prodDomain && scheme ? `${scheme}://${prodDomain}/alexa` : '';- const voicePreviewUrl = devDomain && scheme ? `${scheme}://${devDomain}/emb/voice` : '';+ const voicePreviewUrl = prodDomain && scheme ? `${scheme}://${prodDomain}/emb/voice` : '';/*** Copies the given text to clipboard.@@ -88,7 +88,7 @@ const VoiceEmbodimentModal: React.FC<VoiceEmbodimentModalProps> = ({</script><script>VoiceEmbodiment.init({- domain: '${domain}',+ domain: '${domain}?type=widget',});</script>`;diff --git a/packages/app/src/react/features/embodiments/form-embodiment-modal.tsx b/packages/app/src/react/features/embodiments/form-embodiment-modal.tsxindex 33bd605c..01b95394 100644--- a/packages/app/src/react/features/embodiments/form-embodiment-modal.tsx+++ b/packages/app/src/react/features/embodiments/form-embodiment-modal.tsx@@ -80,8 +80,7 @@ const FormEmbodimentModal: FC<FormEmbodimentModalProps> = ({</script><script>FormPreview.init({- domain: '${domain}?endpointId=${selectedEndpoint}',- // ... additional settings ...+ domain: '${domain}?endpointId=${selectedEndpoint}&type=widget&style=widget'});</script>`;