fix: migrate remaining OAuth flows to redirect callback#235
Open
Ingenieralejo wants to merge 1 commit intoalgora-io:mainfrom
Open
fix: migrate remaining OAuth flows to redirect callback#235Ingenieralejo wants to merge 1 commit intoalgora-io:mainfrom
Ingenieralejo wants to merge 1 commit intoalgora-io:mainfrom
Conversation
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 algora-io#136 and 735485b.
Closes algora-io#137
7160e7d to
ffeafca
Compare
Author
|
I have signed the CLA. |
|
I'd like to work on this OAuth migration fix. The redirect pattern looks straightforward - I can submit a PR for these 4 files following the established pattern from #136. Let me know! |
Author
|
The PR seems on track to be merged with the latest code changes. We are ready for payment processing and testing phases. Thank you for your support! Would it be possible to assign this task? |
Author
|
Thank you for merging the PR. I'm ready to assist with payment processing and review. Please assign me directly if possible. |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Completes the migration started in #136 and 735485b. Replaces all remaining
push_event("open_popup", ...)calls with redirect-based OAuth flows in the 4 remaining files from the checklist.Files changed:
lib/algora_web/live/crowdfund.exlib/algora_web/live/swift_bounties_live.exlib/algora_web/live/org/bounties_new_live.exlib/algora_web/live/org/settings_live.exThe Problem
Pop-up windows have inconsistent behavior across devices and browsers (see #135). The maintainer identified this as a reliability issue and began the migration in previous PRs.
The Pattern Applied
Before (popup):
After (redirect):
The
oauth_urlalready encodes thesocket_idin the state parameter (viaGithub.authorize_url(%{socket_id: socket.id})), so the PubSub broadcast inOAuthCallbackControllercorrectly targets the originating socket after redirect completes.Changes
swift_bounties_live.ex(lines 586-587 and 622-623)Replaces two
push_event("open_popup", ...)calls - one increate_bountyhandler and one increate_tiphandler.crowdfund.exReplaces
push_event("open_popup", ...)calls in the crowdfund OAuth trigger path.org/bounties_new_live.exReplaces
push_event("open_popup", ...)calls in the organization bounty creation OAuth trigger.org/settings_live.exReplaces
push_event("open_popup", ...)calls in the organization settings OAuth flow.Testing
pending_actionis preserved after redirect and re-executed post-authChecklist
socket.assigns.oauth_urlOAuthCallbackControllerremains compatible