Skip to content

Commit

Permalink
feat: Add support for custom redirect port in clasp login (#1020)
Browse files Browse the repository at this point in the history
This commit introduces a new feature allowing users to specify a custom redirect port for the `clasp login` command using the `--redirect-port` flag.

Also, updates package-lock.json due to dependency changes.
  • Loading branch information
i4erkasov authored Jan 7, 2025
1 parent 576250f commit d55832e
Show file tree
Hide file tree
Showing 6 changed files with 274 additions and 1,316 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ The following command provide basic Apps Script project management.
clasp
```

- [`clasp login [--no-localhost] [--creds <file>] [--status]`](#login)
- [`clasp login [--no-localhost] [--creds <file>] [--status] [--redirect-port]`](#login)
- [`clasp logout`](#logout)
- [`clasp create [--title <title>] [--type <type>] [--rootDir <dir>] [--parentId <id>]`](#create)
- [`clasp clone <scriptId | scriptURL> [versionNumber] [--rootDir <dir>]`](#clone)
Expand Down Expand Up @@ -132,12 +132,14 @@ Logs the user in. Saves the client credentials to a `.clasprc.json` file.
- `--no-localhost`: Do not run a local server, manually enter code instead.
- `--creds <file>`: Use custom credentials used for `clasp run`. Saves a `.clasprc.json` file to current working directory. This file should be private!
- `--status`: Print who you are currently logged in as, if anyone.
- `--redirect-port <port>`: Specify a custom port for the local redirect server during the login process. Useful for environments where a specific port is required.

#### Examples

- `clasp login --no-localhost`
- `clasp login --creds creds.json`
- `clasp login --status`
- `clasp login --redirect-port 37473`

### Logout

Expand Down
Loading

0 comments on commit d55832e

Please sign in to comment.