Conversation
Implement Google OAuth 2.0 device flow authentication to enable personalized YouTube feeds including subscriptions, liked videos, and Watch Later playlists. Changes: - Add youtube_oauth module with full OAuth flow implementation - Add YoutubeFeedType enum (public, subscriptions, liked_videos, watch_later) - Update YoutubeConfig with client_id, client_secret, feed_type fields - Add youtube-auth and youtube-logout CLI commands - Token storage in ~/.feedtui/youtube_tokens.json with auto-refresh Closes #18 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Code ReviewI found 1 security issue that should be addressed: Security Issue: Insecure Token Storage PermissionsLocation: src/feeds/youtube_oauth.rs:90-96 OAuth tokens (access_token and refresh_token) are stored in Impact: Any user or process on the system can read these sensitive credentials and gain unauthorized access to the user's YouTube account. Fix: Set file permissions to 0600 (owner read/write only) and directory permissions to 0700. On Unix systems, use Reference: feedtui/src/feeds/youtube_oauth.rs Lines 89 to 97 in 8d3cccd |
Summary
youtube-authandyoutube-logoutCLI commands for token management~/.feedtui/youtube_tokens.jsonwith auto-refreshChanges
src/feeds/youtube_oauth.rsmodule with full OAuth flowYoutubeFeedTypeenum to config.rs with four feed typesYoutubeConfigwithclient_id,client_secret,feed_typefieldsUsage
feedtui youtube-auth --client-id=... --client-secret=...feed_type = "subscriptions"(orliked_videos,watch_later)Test plan
feedtui youtube-authcommand initiates device flowfeedtui youtube-logoutclears tokensCloses #18
🤖 Generated with Claude Code