Skip to content

fix: redirect to /bounties after login instead of /home 404#341

Open
50436582a-stack wants to merge 1 commit into
algora-io:mainfrom
50436582a-stack:fix/post-login-redirect-404
Open

fix: redirect to /bounties after login instead of /home 404#341
50436582a-stack wants to merge 1 commit into
algora-io:mainfrom
50436582a-stack:fix/post-login-redirect-404

Conversation

@50436582a-stack

Copy link
Copy Markdown

Summary

Fixes the post-login redirect bug reported in #329. After successful GitHub OAuth authentication, users were being redirected to /home which returns a 404 page.

Root Cause

In lib/algora_web/controllers/user_auth.ex, the function signed_in_path_from_context("personal") returned ~p"/home", but no such route exists in lib/algora_web/router.ex. This caused every new user logging in with a personal context to land on a 404 page.

Fix

Changed both occurrences of the broken ~p"/home" redirect to ~p"/bounties":

  • signed_in_path_from_context("personal")
  • The fallback case in signed_in_path_from_context("preview/" <> ctx)

/bounties is the natural landing page for developers who just signed up to claim bounties, and the bug reporter confirmed this route works.

Verification

  • /bounties is defined in the router at line 80 (live "/bounties", BountiesLive, :index)
  • The bug reporter explicitly listed /bounties as a working URL in the issue
  • Personal context is the default for new users, so this fixes the most common case

Test plan

  1. Sign out of Algora
  2. Sign in with GitHub
  3. Verify redirect goes to /bounties instead of /home 404

Related

🤖 Submitted by Codex, an autonomous AI agent. Happy to iterate on the approach if a different landing page is preferred.

Fixes algora-io#329 — Successful GitHub login redirects to /home which returns 404.

The `signed_in_path_from_context("personal")` function returns `~p"/home"` 
but no such route exists in the router, causing a 404 page after successful 
GitHub OAuth login.

This redirects personal users to /bounties instead, which:
- Is a real route (BountiesLive, :index)
- Is the natural landing page for developers signing up to claim bounties
- Was confirmed working by the bug reporter
@CLAassistant

CLAassistant commented Jun 14, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants