From dd268993b34b03a2348bd75fc4b78fefbb758def Mon Sep 17 00:00:00 2001 From: Tim Perry Date: Wed, 4 Apr 2018 13:43:47 +0200 Subject: [PATCH 1/2] Throw a clear error when logging in with an invalid token Change-Type: patch --- lib/actions/auth.coffee | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/actions/auth.coffee b/lib/actions/auth.coffee index 69529b35..2df18d20 100644 --- a/lib/actions/auth.coffee +++ b/lib/actions/auth.coffee @@ -88,6 +88,11 @@ exports.login = name: 'token' type: 'input' .then(resin.auth.loginWithToken) + .tap -> + resin.auth.whoami() + .then (username) -> + if !username + patterns.expectedError('Token authentication failed') else if options.credentials return patterns.authenticate(options) else if options.web From d166a6542249ff0e353d6f2e3f7bc5b4def3effb Mon Sep 17 00:00:00 2001 From: "resin-io-versionbot[bot]" Date: Wed, 4 Apr 2018 18:56:26 +0000 Subject: [PATCH 2/2] v7.2.2 --- CHANGELOG.md | 4 ++++ package.json | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6bf28637..d62555d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY! This project adheres to [Semantic Versioning](http://semver.org/). +## v7.2.2 - 2018-04-04 + +* Throw a clear error when logging in with an invalid token #846 [Tim Perry] + ## v7.2.1 - 2018-03-29 * Update docker-qemu-transpose to avoid the broken 0.4.1 release #839 [Tim Perry] diff --git a/package.json b/package.json index 4b104aec..8a2b315d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "resin-cli", - "version": "7.2.1", + "version": "7.2.2", "description": "The official resin.io CLI tool", "main": "./build/actions/index.js", "homepage": "https://github.com/resin-io/resin-cli",