Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Amplify CLI auth command allows you to authenticate with the Amplify Platform under one or more accounts and switch between them.

Usage

Code Block
languagebash
amplify auth <command> [options]

Commands

  • lslist - Lists all authenticated accounts
  • login - Log in to the Amplify Platform
  • logout - Log out of all or specific accounts
  • switch - Select default account and organization

ls, list

Displays a list of all authenticated accounts.

...

  • --json - Outputs accounts as JSON

login

Log into the Amplify Platform using Proof Key for Code Exchange (PKCE), client secret key, username/password, or signed JSON Web Token (JWT) file.

...

The access token will expire after a short period after it has been issued. The access token will automatically renew within a longer period of time since the token was issued. If too much time has passed, then the user must re-authenticate.

logout

Revokes access tokens for one, multiple, or all accounts.

...

  • --all - Revoke all accounts
  • --json - Outputs revoked accounts as JSON

switch

Once authenticated into at least one account, you can set the default account and organization to use for amplify commands.

...