mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 04:02:00 -06:00
Replace all login username references with email
This commit is contained in:
parent
b4057599a1
commit
77609be598
3 changed files with 8 additions and 8 deletions
|
|
@ -110,12 +110,12 @@ $ cargo install --force --path .
|
|||
|
||||
crunchy-cli requires you to log in.
|
||||
Though you can use a non-premium account, you will not have access to premium content without a subscription.
|
||||
You can authenticate with your credentials (user:password) or by using a refresh token.
|
||||
You can authenticate with your credentials (email:password) or by using a refresh token.
|
||||
|
||||
- Credentials
|
||||
|
||||
```shell
|
||||
$ crunchy-cli --credentials "user:password" <command>
|
||||
$ crunchy-cli --credentials "email:password" <command>
|
||||
```
|
||||
|
||||
- Refresh Token
|
||||
|
|
@ -208,8 +208,8 @@ The `login` command can store your session, so you don't have to authenticate ev
|
|||
|
||||
```shell
|
||||
# save the refresh token which gets generated when login with credentials.
|
||||
# your username/email and password won't be stored at any time on disk
|
||||
$ crunchy-cli login --credentials "user:password"
|
||||
# your email and password won't be stored at any time on disk
|
||||
$ crunchy-cli login --credentials "email:password"
|
||||
# save etp-rt cookie
|
||||
$ crunchy-cli login --etp-rt "4ebf1690-53a4-491a-a2ac-488309120f5d"
|
||||
```
|
||||
|
|
|
|||
|
|
@ -342,10 +342,10 @@ async fn crunchyroll_session(cli: &mut Cli) -> Result<Crunchyroll> {
|
|||
};
|
||||
|
||||
let crunchy = if let Some(credentials) = &login_method.credentials {
|
||||
if let Some((user, password)) = credentials.split_once(':') {
|
||||
builder.login_with_credentials(user, password).await?
|
||||
if let Some((email, password)) = credentials.split_once(':') {
|
||||
builder.login_with_credentials(email, password).await?
|
||||
} else {
|
||||
bail!("Invalid credentials format. Please provide your credentials as user:password")
|
||||
bail!("Invalid credentials format. Please provide your credentials as email:password")
|
||||
}
|
||||
} else if let Some(etp_rt) = &login_method.etp_rt {
|
||||
builder.login_with_etp_rt(etp_rt).await?
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ impl Execute for Login {
|
|||
#[derive(Clone, Debug, Parser)]
|
||||
pub struct LoginMethod {
|
||||
#[arg(
|
||||
help = "Login with credentials (username or email and password). Must be provided as user:password"
|
||||
help = "Login with credentials (email and password). Must be provided as email:password"
|
||||
)]
|
||||
#[arg(long)]
|
||||
pub credentials: Option<String>,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue