Skip to content

feat: consume OAuth refresh token from URL hash fragment#657

Merged
njbrake merged 1 commit intomainfrom
feat/oauth-hash-fragment-consumer
Mar 18, 2026
Merged

feat: consume OAuth refresh token from URL hash fragment#657
njbrake merged 1 commit intomainfrom
feat/oauth-hash-fragment-consumer

Conversation

@njbrake
Copy link
Copy Markdown
Member

@njbrake njbrake commented Mar 18, 2026

Description

Add hash fragment consumer to api-client.ts that reads #refresh_token=<token> from the URL on page load, stores the token in localStorage, and cleans the URL. Required for the premium OAuth callback flow which redirects to /app#refresh_token=<token>.

Type

  • Feature

Checklist

  • Tests pass (uv run pytest -v)
  • Lint passes (ruff check backend/ && ruff format --check backend/)
  • New tests added for new functionality
  • Bug fixes include regression tests

AI Usage

  • AI-assisted (describe how)
    • Code written with Claude Code

🤖 Generated with Claude Code

The premium OAuth callback redirects to /app#refresh_token=<token>.
This adds an IIFE at module load that reads the token from the hash,
stores it in localStorage, and cleans the URL. Matches the pattern
used by porchsongs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions Bot added missing-template PR is missing required template checklist and removed missing-template PR is missing required template checklist labels Mar 18, 2026
@njbrake njbrake merged commit 534ec95 into main Mar 18, 2026
10 of 11 checks passed
@njbrake njbrake deleted the feat/oauth-hash-fragment-consumer branch March 18, 2026 12:39
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.

1 participant