From ffeafcab62eea475a1a6b177b42378238ec64d8f Mon Sep 17 00:00:00 2001 From: Alejandro Monroy Date: Thu, 16 Apr 2026 17:30:15 -0500 Subject: [PATCH] fix: migrate remaining OAuth flows to redirect callback (#137) Replace all remaining push_event("open_popup", ...) calls with redirect(external: socket.assigns.oauth_url) in the 4 files from the checklist: - swift_bounties_live.ex (2 occurrences: create_bounty, create_tip) - crowdfund.ex (2 occurrences: create_bounty, create_tip) - org/bounties_new_live.ex (1 occurrence: create_bounty) - org/settings_live.ex (1 occurrence: install_app) Follows the same pattern established in #136 and 735485b. Closes #137 --- lib/algora_web/live/crowdfund.ex | 4 ++-- lib/algora_web/live/org/bounties_new_live.ex | 2 +- lib/algora_web/live/org/settings_live.ex | 2 +- lib/algora_web/live/swift_bounties_live.ex | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/algora_web/live/crowdfund.ex b/lib/algora_web/live/crowdfund.ex index 6eb21d508..9d8eb5a89 100644 --- a/lib/algora_web/live/crowdfund.ex +++ b/lib/algora_web/live/crowdfund.ex @@ -437,7 +437,7 @@ defmodule AlgoraWeb.CrowdfundLive do {:noreply, socket |> assign(:pending_action, {event, unsigned_params}) - |> push_event("open_popup", %{url: socket.assigns.oauth_url})} + |> redirect(external: socket.assigns.oauth_url)} end else {:noreply, assign(socket, :bounty_form, to_form(changeset))} @@ -474,7 +474,7 @@ defmodule AlgoraWeb.CrowdfundLive do {:noreply, socket |> assign(:pending_action, {event, unsigned_params}) - |> push_event("open_popup", %{url: socket.assigns.oauth_url})} + |> redirect(external: socket.assigns.oauth_url)} end else {:noreply, assign(socket, :tip_form, to_form(changeset))} diff --git a/lib/algora_web/live/org/bounties_new_live.ex b/lib/algora_web/live/org/bounties_new_live.ex index 5f232c698..a35e447af 100644 --- a/lib/algora_web/live/org/bounties_new_live.ex +++ b/lib/algora_web/live/org/bounties_new_live.ex @@ -323,7 +323,7 @@ defmodule AlgoraWeb.Org.BountiesNewLive do {:noreply, socket |> assign(:pending_action, {event, unsigned_params}) - |> push_event("open_popup", %{url: socket.assigns.oauth_url})} + |> redirect(external: socket.assigns.oauth_url)} end end diff --git a/lib/algora_web/live/org/settings_live.ex b/lib/algora_web/live/org/settings_live.ex index 02e84436f..3dfa2f45b 100644 --- a/lib/algora_web/live/org/settings_live.ex +++ b/lib/algora_web/live/org/settings_live.ex @@ -286,7 +286,7 @@ defmodule AlgoraWeb.Org.SettingsLive do else socket |> assign(:pending_action, {event, unsigned_params}) - |> push_event("open_popup", %{url: socket.assigns.oauth_url}) + |> redirect(external: socket.assigns.oauth_url) end} end diff --git a/lib/algora_web/live/swift_bounties_live.ex b/lib/algora_web/live/swift_bounties_live.ex index 1a2e0af03..53a8a84b3 100644 --- a/lib/algora_web/live/swift_bounties_live.ex +++ b/lib/algora_web/live/swift_bounties_live.ex @@ -584,7 +584,7 @@ defmodule AlgoraWeb.SwiftBountiesLive do {:noreply, socket |> assign(:pending_action, {event, unsigned_params}) - |> push_event("open_popup", %{url: socket.assigns.oauth_url})} + |> redirect(external: socket.assigns.oauth_url)} end else {:noreply, assign(socket, :bounty_form, to_form(changeset))} @@ -620,7 +620,7 @@ defmodule AlgoraWeb.SwiftBountiesLive do {:noreply, socket |> assign(:pending_action, {event, unsigned_params}) - |> push_event("open_popup", %{url: socket.assigns.oauth_url})} + |> redirect(external: socket.assigns.oauth_url)} end else {:noreply, assign(socket, :tip_form, to_form(changeset))}