Skip to content

fix: re-authorize button actually visible on configured services (#329)#332

Closed
radaghastly wants to merge 3 commits into
mainfrom
fix/329-reauth-button-v2
Closed

fix: re-authorize button actually visible on configured services (#329)#332
radaghastly wants to merge 3 commits into
mainfrom
fix/329-reauth-button-v2

Conversation

@radaghastly
Copy link
Copy Markdown
Collaborator

Fix

PR #330 added the re-auth button to renderCard(), but the main services page uses renderConfiguredCards() from services.js — so the button never appeared. This PR fixes that.

Changes

src/routes/ui/services.js

  • Added getRetryRoute() helper that maps OAuth service names to their /retry routes
  • Updated renderConfiguredCards() to show a Re-authorize button (or Retry Auth if no token) next to the Details link for all OAuth services

src/routes/ui/service-detail.js + views/pages/service-detail.ejs

  • Added a Re-authorize button on the service detail page for OAuth services
  • Button triggers the existing /retry route which redirects to the provider OAuth consent screen with prompt=consent, using the stored client credentials

OAuth services with re-auth support

  • YouTube (/ui/youtube/retry)
  • Google Calendar (/ui/google/retry)
  • Fitbit (/ui/fitbit/retry)
  • LinkedIn (/ui/linkedin/retry)
  • Reddit (/ui/reddit/retry)
  • Mastodon (/ui/mastodon/retry)

Closes #329

Testing

  • ✅ Lint passes
  • ✅ All 99 tests pass (8 suites)

Copy link
Copy Markdown
Collaborator

@luthien-m luthien-m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good instinct adding it to service-detail — the detail page fix is right. But a couple issues:

  1. Drop the services.js changes. Luis explicitly said he only wants the button on the detail page, not the services list. The list should stay clean (name + Details).

  2. Button placement: You have it at the top of the credentials card before the fields. Better at the bottom, after the credential fields — it's a secondary action, not the first thing you see.

  3. Styling: Should be btn-secondary not btn-primary. Re-authorize is a secondary action on this page — btn-primary draws too much attention for something you rarely click.

Note: My PR #331 already covers the detail page fix with these points addressed. Happy to close mine if you'd rather update yours — just drop the services.js changes and adjust placement/styling.

@perrytook perrytook closed this Feb 25, 2026
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.

Add re-auth button for OAuth services in admin UI

3 participants