fix: re-authorize button actually visible on configured services (#329)#332
fix: re-authorize button actually visible on configured services (#329)#332radaghastly wants to merge 3 commits into
Conversation
luthien-m
left a comment
There was a problem hiding this comment.
Good instinct adding it to service-detail — the detail page fix is right. But a couple issues:
-
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).
-
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.
-
Styling: Should be
btn-secondarynotbtn-primary. Re-authorize is a secondary action on this page —btn-primarydraws 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.
Fix
PR #330 added the re-auth button to
renderCard(), but the main services page usesrenderConfiguredCards()fromservices.js— so the button never appeared. This PR fixes that.Changes
src/routes/ui/services.jsgetRetryRoute()helper that maps OAuth service names to their/retryroutesrenderConfiguredCards()to show a Re-authorize button (or Retry Auth if no token) next to the Details link for all OAuth servicessrc/routes/ui/service-detail.js+views/pages/service-detail.ejs/retryroute which redirects to the provider OAuth consent screen withprompt=consent, using the stored client credentialsOAuth services with re-auth support
/ui/youtube/retry)/ui/google/retry)/ui/fitbit/retry)/ui/linkedin/retry)/ui/reddit/retry)/ui/mastodon/retry)Closes #329
Testing