Skip to content

Commit

Permalink
Update default auth
Browse files Browse the repository at this point in the history
  • Loading branch information
nick42d committed Nov 18, 2024
1 parent e08dfb2 commit 85e0756
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,10 @@ This project is not supported or endorsed by Google.
`cargo install youtui`

## Running youtui
The default option is to use oauth authentication. To change this to browser authentication, a `config.toml` file can be added to the local youtui config directory (e.g `~/.config/youtui/` on Linux), with the value `auth_type = "Browser"`. Please note however that config file format is currently unstable and could change in the future.
The default option is to use browser authentication, oauth authentication is likely being phased out by Google. To change this to oauth authentication, a `config.toml` file can be added to the local youtui config directory (e.g `~/.config/youtui/` on Linux), with the value `auth_type = "OAuth"`. Please note however that config file format is currently unstable and could change in the future.
### Commands
1. To run the TUI application, execute `youtui` with no arguments.
1. To use the API in command-line mode, execute `youtui --help` to see available commands.
### OAuth Setup Steps
1. Setup the oauth token in the default configuration directory by running `youtui setup-oauth` and following the instructions.
### Browser Auth Setup Steps
1. Open YouTube Music in your browser - ensure you are logged in.
1. Open web developer tools (F12).
Expand All @@ -45,6 +43,10 @@ Firefox example (Right click and Copy Value):
![image](https://github.com/nick42d/youtui/assets/133559267/c7fda32c-10bc-4ebe-b18e-ee17c13f6bd0)
Chrome example (Select manually and paste):
![image](https://github.com/nick42d/youtui/assets/133559267/bd2ec37b-1a78-490f-b313-694145bb4854)
### OAuth Setup Steps
1. Setup the oauth token in the default configuration directory by running `youtui setup-oauth` and following the instructions.
### Other Setup
1. If music downloads always return an error, you are able to supply a PO Token by saving it to the file `po_token.txt` into your local youtui config directory. For more information on PO Tokens and how to obtain them, see [here](https://github.com/yt-dlp/yt-dlp/wiki/Extractors#po-token-guide).

## Dependencies note
### General
Expand Down
2 changes: 1 addition & 1 deletion youtui/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ pub struct Config {
#[derive(ValueEnum, Copy, Clone, Default, Debug, Serialize, Deserialize)]
pub enum AuthType {
#[value(name = "oauth")]
#[default]
OAuth,
#[default]
Browser,
}

Expand Down

0 comments on commit 85e0756

Please sign in to comment.