From 5638a4db5efe9390bac7f566230355bfa6f14fdd Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Tue, 14 Nov 2023 15:49:00 +0100 Subject: [PATCH] fix: authorize renamed to login (#26) --- src/pages/docs/how-to/create-account.md | 2 +- src/pages/docs/how-to/upload.md | 10 +++++----- src/pages/docs/quickstart.md | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/pages/docs/how-to/create-account.md b/src/pages/docs/how-to/create-account.md index a6aad50..571ba01 100644 --- a/src/pages/docs/how-to/create-account.md +++ b/src/pages/docs/how-to/create-account.md @@ -9,7 +9,7 @@ You first need to create and register a Space you'll upload to. A Space acts as The easiest way to create and register a Space is by using the CLI 1. Install the CLI from npm using your command line: `npm install -g @web3-storage/w3cli` -2. Run `w3 authorize [alice@example.com](mailto:alice@example.com)` in the command line using your email address. This will send an email to your inbox with a link for validation. +2. Run `w3 login [alice@example.com](mailto:alice@example.com)` in the command line using your email address. This will send an email to your inbox with a link for validation. 3. Once you click on the validation link, you'll be taken to a webpage where you can enter your payment information and select a plan (like our Free tier). 4. Create a new Space for storing your data and register it: w3 space create diff --git a/src/pages/docs/how-to/upload.md b/src/pages/docs/how-to/upload.md index 024d992..7cf2db4 100644 --- a/src/pages/docs/how-to/upload.md +++ b/src/pages/docs/how-to/upload.md @@ -19,8 +19,8 @@ In the previous section, you created a Space that has a unique DID. To use the c If you followed the Create account and Space section, you will already have the CLI set up with a Space. However, you might be using the CLI on a new machine, in which case you can follow these instructions: 1. (If not yet installed) Install the CLI from npm using your command line: `npm install -g @web3-storage/w3cli`. -2. Run `w3 authorize [alice@example.com](mailto:alice@example.com)` in the command line using your email address. Click on the validation link sent to your email. -3. After successfully running `authorize`, your CLI Agent has been delegated access to all Spaces associated with your email address. You can see a list of these Spaces using `w3 space ls` and select the one you'd like to upload to using `w3 space use \`. +2. Run `w3 login [alice@example.com](mailto:alice@example.com)` in the command line using your email address. Click on the validation link sent to your email. +3. After successfully running `login`, your CLI Agent has been delegated access to all Spaces associated with your email address. You can see a list of these Spaces using `w3 space ls` and select the one you'd like to upload to using `w3 space use \`. When the right Space is selected, you are ready to upload! You can do so by running `w3 up \`. @@ -76,13 +76,13 @@ const client = await create() By default, clients will create a new [Agent](https://web3-storage.github.io/w3protocol/classes/_web3_storage_access.Agent.html) and put it in a persistent local [Store](https://github.com/web3-storage/w3up/tree/main/packages/access-client) if it can't find an existing one to load (so the next time the client is initialized on the same device, it will use the same Agent). -Then you can authorize your Agent with your email address. Calling authorize will cause an email to be sent to the given address. +Then you can login your Agent with your email address. Calling login will cause an email to be sent to the given address. ```javascript -await client.authorize('zaphod@beeblebrox.galaxy') +await client.login('zaphod@beeblebrox.galaxy') ``` -Once a user clicks the confirmation link in the email, the authorize method will resolve. Make sure to check for errors, as authorize will fail if the email is not confirmed within the expiration timeout. Authorization needs to happen only once per agent. This also claims all delegations available with your email address, so from there, you can select the Space you'd like to use. +Once a user clicks the confirmation link in the email, the login method will resolve. Make sure to check for errors, as login will fail if the email is not confirmed within the expiration timeout. Authorization needs to happen only once per agent. This also claims all delegations available with your email address, so from there, you can select the Space you'd like to use. ```javascript await client.setCurrentSpace(space.did()) # select the relevant Space DID that is associated with your account diff --git a/src/pages/docs/quickstart.md b/src/pages/docs/quickstart.md index 973bdd9..ee54687 100644 --- a/src/pages/docs/quickstart.md +++ b/src/pages/docs/quickstart.md @@ -30,7 +30,7 @@ npm install -g @web3-storage/w3cli You need to create a web3.storage account associated with an email address and set it up so you can start uploading to a Space. The Space is created locally and associated with a private key, and is then registered with web3.storage and associated with your email address. But don't worry about keeping track of the Space's private key! web3.storage's email authorization system allows this private key to be treated as a throwaway key. -1. Run `w3 authorize [alice@example.com](mailto:alice@example.com)` in the command line using your email address. This will sent an email to your inbox with a link for validation. +1. Run `w3 login [alice@example.com](mailto:alice@example.com)` in the command line using your email address. This will sent an email to your inbox with a link for validation. 2. Once you click on the validation link, you'll be taken to a webpage where you can enter your payment information and select a plan (like our Free tier). 3. Create a new Space for storing your data and register it: