From 36a32532b54e33fb57438c0142d3774b15353ea8 Mon Sep 17 00:00:00 2001 From: Roberta Moreira <30378788+Robi9@users.noreply.github.com> Date: Wed, 13 Sep 2023 11:57:02 -0300 Subject: [PATCH] Remove Facebook login redirect (#450) * Back changes to template org_whatsapp_cloud_connect * Fix variable name * Back popup to create WAC channels --- templates/channels/types/whatsapp_cloud/claim.haml | 6 ------ templates/orgs/org_whatsapp_cloud_connect.haml | 5 ----- 2 files changed, 11 deletions(-) diff --git a/templates/channels/types/whatsapp_cloud/claim.haml b/templates/channels/types/whatsapp_cloud/claim.haml index a1f1e84c6c0..9a8af59a1f7 100644 --- a/templates/channels/types/whatsapp_cloud/claim.haml +++ b/templates/channels/types/whatsapp_cloud/claim.haml @@ -9,12 +9,6 @@ .alert-error.my-4 {{ claim_error }} - -if unsupported_facebook_business_id - .alert-error.my-4 - -blocktrans trimmed - One of the Facebook business manager you are trying to connect is not configured. - If you do not see the WhatsApp business number you want to connect, please reach out for support. - -block form .mt-4 %form#claim-form(style="display:none;" method="POST" action="{{ claim_url }}") diff --git a/templates/orgs/org_whatsapp_cloud_connect.haml b/templates/orgs/org_whatsapp_cloud_connect.haml index e7dff831fe1..6e8f3d16631 100644 --- a/templates/orgs/org_whatsapp_cloud_connect.haml +++ b/templates/orgs/org_whatsapp_cloud_connect.haml @@ -52,7 +52,6 @@ } }); - window.fbAsyncInit = function () { // JavaScript SDK configuration and setup FB.init({ @@ -81,10 +80,6 @@ $("#user-access-token").val(accessToken); $("#claim-form").submit(); } - //Use this token to call the debug_token API and get the shared WABA's ID - } else { - console.log('User cancelled login or did not fully authorize, redirect to the dialog auth'); - //location.replace("https://www.facebook.com/v14.0/dialog/oauth?client_id={{ facebook_app_id }}&redirect_uri=" + window.location.origin + window.location.pathname + "&scope=business_management,whatsapp_business_management,whatsapp_business_messaging&response_type=token") } }, { scope: 'business_management,whatsapp_business_management,whatsapp_business_messaging',